From 6bbbf9889d8638b6b11e199b1cb0ec15a7170a13 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Jul 2008 13:22:29 +0000 Subject: * thread.c (thread_initialize): NUM2INT() returns int. * thread.c (timer_thread_function), thread_pthread.c (thread_timer), thread_win32.c (timer_thread_func), thread_{pthread,win32}.c (rb_thread_create_timer_thread): passing VM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 3076f0414e..6c54fe728a 100644 --- a/thread.c +++ b/thread.c @@ -151,6 +151,7 @@ rb_thread_s_debug_set(VALUE self, VALUE val) #endif NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)); +static void timer_thread_function(void *); #if defined(_WIN32) #include "thread_win32.c" @@ -490,7 +491,7 @@ thread_initialize(VALUE thread, VALUE args) rb_raise(rb_eThreadError, "already initialized thread - %s", file); } - rb_raise(rb_eThreadError, "already initialized thread - %s:%ld", + rb_raise(rb_eThreadError, "already initialized thread - %s:%d", file, NUM2INT(line)); } return thread_create_core(thread, args, 0); @@ -2050,9 +2051,9 @@ rb_gc_save_machine_context(rb_thread_t *th) int rb_get_next_signal(rb_vm_t *vm); static void -timer_thread_function(void) +timer_thread_function(void *arg) { - rb_vm_t *vm = GET_VM(); /* TODO: fix me for Multi-VM */ + rb_vm_t *vm = arg; /* TODO: fix me for Multi-VM */ /* for time slice */ RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread); -- cgit v1.2.3