diff options
Diffstat (limited to 'thread_win32.c')
-rw-r--r-- | thread_win32.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/thread_win32.c b/thread_win32.c index 2d5eac1ff4..6db1f25fa7 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -20,6 +20,8 @@ #define native_thread_yield() Sleep(0) #define unregister_ubf_list(th) +#define ubf_wakeup_all_threads() do {} while (0) +#define ubf_threads_empty() (1) static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES; @@ -680,18 +682,21 @@ static struct { static unsigned long __stdcall timer_thread_func(void *dummy) { + rb_vm_t *vm = GET_VM(); thread_debug("timer_thread\n"); rb_w32_set_thread_description(GetCurrentThread(), L"ruby-timer-thread"); while (WaitForSingleObject(timer_thread.lock, TIME_QUANTUM_USEC/1000) == WAIT_TIMEOUT) { - timer_thread_function(dummy); + timer_thread_function(); + ruby_sigchld_handler(vm); /* probably no-op */ + rb_threadptr_check_signal(vm->main_thread); } thread_debug("timer killed\n"); return 0; } void -rb_thread_wakeup_timer_thread(void) +rb_thread_wakeup_timer_thread(int sig) { /* do nothing */ } @@ -768,6 +773,26 @@ rb_reserved_fd_p(int fd) return 0; } +int +rb_sigwait_fd_get(rb_thread_t *th) +{ + return -1; /* TODO */ +} + +NORETURN(void rb_sigwait_fd_put(rb_thread_t *, int)); +void +rb_sigwait_fd_put(rb_thread_t *th, int fd) +{ + rb_bug("not implemented, should not be called"); +} + +NORETURN(void rb_sigwait_sleep(const rb_thread_t *, int, const struct timespec *)); +void +rb_sigwait_sleep(const rb_thread_t *th, int fd, const struct timespec *ts) +{ + rb_bug("not implemented, should not be called"); +} + rb_nativethread_id_t rb_nativethread_self(void) { |