ruby-changes:7711
From: nobu <ko1@a...>
Date: Mon, 8 Sep 2008 06:38:41 +0900 (JST)
Subject: [ruby-changes:7711] Ruby:r19232 (mvm): * thread.c (rb_thread_check_trap_pending): fix for MVM.
nobu 2008-09-08 06:38:26 +0900 (Mon, 08 Sep 2008) New Revision: 19232 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19232 Log: * thread.c (rb_thread_check_trap_pending): fix for MVM. * thread.c (rb_queue_empty_p): added. * vm_core.h (rb_thread_set_current_raw): fixed typo. Modified files: branches/mvm/ChangeLog branches/mvm/thread.c branches/mvm/vm_core.h Index: mvm/ChangeLog =================================================================== --- mvm/ChangeLog (revision 19231) +++ mvm/ChangeLog (revision 19232) @@ -1,4 +1,4 @@ -Mon Sep 8 06:04:11 2008 Nobuyoshi Nakada <nobu@r...> +Mon Sep 8 06:38:22 2008 Nobuyoshi Nakada <nobu@r...> * configure.in (XLDFLAGS): added --enable-auto-import for cygwin and mingw. @@ -8,6 +8,12 @@ * thread_pthread.c (get_stack): defines only if possible. + * thread.c (rb_thread_check_trap_pending): fix for MVM. + + * thread.c (rb_queue_empty_p): added. + + * vm_core.h (rb_thread_set_current_raw): fixed typo. + Sat Sep 6 15:06:21 2008 Tanaka Akira <akr@f...> * transcode.c (sym_html): new variable. Index: mvm/vm_core.h =================================================================== --- mvm/vm_core.h (revision 19231) +++ mvm/vm_core.h (revision 19232) @@ -442,6 +442,7 @@ void rb_queue_destroy(rb_queue_t *); int rb_queue_push(rb_queue_t *, void *); int rb_queue_shift(rb_queue_t *, void **); +int rb_queue_empty_p(const rb_queue_t *); struct rb_thread_struct { @@ -740,7 +741,7 @@ #define rb_thread_set_current_raw(th) (void)(ruby_current_thread = (th)) #else #define ruby_current_thread ruby_thread_from_native() -#define rb_thread_set_current_raw(th) (void)ruby_thread_from_native(th) +#define rb_thread_set_current_raw(th) (void)ruby_thread_set_native(th) #endif rb_thread_t * ruby_thread_from_native(void); Index: mvm/thread.c =================================================================== --- mvm/thread.c (revision 19231) +++ mvm/thread.c (revision 19232) @@ -916,7 +916,7 @@ int rb_thread_check_trap_pending(void) { - return GET_THREAD()->exec_signal != 0; + return !rb_queue_empty_p(&GET_THREAD()->queue.signal); } struct timeval rb_time_timeval(); @@ -1024,6 +1024,13 @@ return Qtrue; } +int +rb_queue_empty_p(const rb_queue_t *que) +{ + if (!que->head) return Qtrue; + return Qfalse; +} + /* * call-seq: * Thread.pass => nil -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/