diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-05 13:22:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-05 13:22:29 +0000 |
commit | 6bbbf9889d8638b6b11e199b1cb0ec15a7170a13 (patch) | |
tree | 2563d20c5166b07c3bbf58d7e2e4f57668877618 /thread.c | |
parent | 2ca7298386fe83c2477870b7020dca593b865733 (diff) | |
download | ruby-6bbbf9889d8638b6b11e199b1cb0ec15a7170a13.tar.gz |
* 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
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |