summaryrefslogtreecommitdiff
path: root/thread_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/thread_win32.c b/thread_win32.c
index 576f617e8d..a2ce3b9d15 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -132,18 +132,22 @@ thread_sched_to_running(struct rb_thread_sched *sched, rb_thread_t *th)
if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): acquire\n", th);
}
-#define thread_sched_to_dead thread_sched_to_waiting
-
static void
-thread_sched_to_waiting(struct rb_thread_sched *sched, rb_thread_t *th)
+thread_sched_to_waiting(struct rb_thread_sched *sched, rb_thread_t *th, bool yield_immediately)
{
ReleaseMutex(sched->lock);
}
static void
+thread_sched_to_dead(struct rb_thread_sched *sched, rb_thread_t *th)
+{
+ thread_sched_to_waiting(sched, th, true);
+}
+
+static void
thread_sched_yield(struct rb_thread_sched *sched, rb_thread_t *th)
{
- thread_sched_to_waiting(sched, th);
+ thread_sched_to_waiting(sched, th, true);
native_thread_yield();
thread_sched_to_running(sched, th);
}
@@ -1020,4 +1024,10 @@ rb_thread_prevent_fork(void *(*func)(void *), void *data)
return func(data);
}
+void
+rb_thread_malloc_stack_set(rb_thread_t *th, void *stack, size_t stack_size)
+{
+ // no-op
+}
+
#endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */