ruby-changes:6732
From: usa <ko1@a...>
Date: Mon, 28 Jul 2008 21:28:01 +0900 (JST)
Subject: [ruby-changes:6732] Ruby:r18248 (trunk): * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): reverted
usa 2008-07-28 21:27:43 +0900 (Mon, 28 Jul 2008) New Revision: 18248 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18248 Log: * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): reverted r18239 because r18245 made the changes unnecessary. * thread.c (rb_mutex_struct): define after including thread_{pthread, win32}.c. Modified files: trunk/ChangeLog trunk/thread.c trunk/thread_win32.c trunk/thread_win32.h Index: thread_win32.c =================================================================== --- thread_win32.c (revision 18247) +++ thread_win32.c (revision 18248) @@ -333,6 +333,16 @@ #endif } +struct cond_event_entry { + struct cond_event_entry* next; + HANDLE event; +}; + +struct rb_thread_cond_struct { + struct cond_event_entry *next; + struct cond_event_entry *last; +}; + static void native_cond_signal(rb_thread_cond_t *cond) { Index: thread_win32.h =================================================================== --- thread_win32.h (revision 18247) +++ thread_win32.h (revision 18248) @@ -25,16 +25,6 @@ typedef CRITICAL_SECTION rb_thread_lock_t; typedef struct rb_thread_cond_struct rb_thread_cond_t; -struct cond_event_entry { - struct cond_event_entry* next; - HANDLE event; -}; - -struct rb_thread_cond_struct { - struct cond_event_entry *next; - struct cond_event_entry *last; -}; - typedef struct native_thread_data_struct { HANDLE interrupt_event; } native_thread_data_t; Index: ChangeLog =================================================================== --- ChangeLog (revision 18247) +++ ChangeLog (revision 18248) @@ -1,3 +1,11 @@ +Mon Jul 28 21:24:33 2008 NAKAMURA Usaku <usa@r...> + + * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): reverted + r18239 because r18245 made the changes unnecessary. + + * thread.c (rb_mutex_struct): define after including thread_{pthread, + win32}.c. + Mon Jul 28 21:00:10 2008 Yusuke Endoh <mame@t...> * test/ruby/test_require.rb (test_require_too_long_filename): @@ -34,9 +42,9 @@ Mon Jul 28 16:01:12 2008 NAKAMURA Usaku <usa@r...> - * thread_win32.[ch]: moved definitions of cond_every_entry and - rb_thread_cond_struct from .c to .h because rb_thread_cond_struct - is used in vm_core.h. + * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): moved + the definitions from .c to .h because rb_thread_cond_struct is used + in vm_core.h. Mon Jul 28 14:29:54 2008 Nobuyoshi Nakada <nobu@r...> @@ -1913,8 +1921,8 @@ Fri Jun 20 03:19:39 2008 Yusuke Endoh <mame@t...> - * test/testunit/collector/test_dir.rb: r15825 made it unnecessary to change - String to Symbol. + * test/testunit/collector/test_dir.rb: r15825 made it unnecessary to + change String to Symbol. * test/testunit/collector/test_objectspace.rb: ditto. Index: thread.c =================================================================== --- thread.c (revision 18247) +++ thread.c (revision 18248) @@ -62,16 +62,6 @@ struct timeval rb_time_interval(VALUE); static int rb_thread_dead(rb_thread_t *th); -typedef struct rb_mutex_struct -{ - rb_thread_lock_t lock; - rb_thread_cond_t cond; - struct rb_thread_struct volatile *th; - volatile int cond_waiting, cond_notified; - struct rb_mutex_struct *next_mutex; -} mutex_t; - -static void rb_mutex_unlock_all(mutex_t *mutex); static void rb_check_deadlock(rb_vm_t *vm); void rb_signal_exec(rb_thread_t *th, int sig); @@ -284,6 +274,17 @@ return ST_CONTINUE; } +typedef struct rb_mutex_struct +{ + rb_thread_lock_t lock; + rb_thread_cond_t cond; + struct rb_thread_struct volatile *th; + volatile int cond_waiting, cond_notified; + struct rb_mutex_struct *next_mutex; +} mutex_t; + +static void rb_mutex_unlock_all(mutex_t *mutex); + void rb_thread_terminate_all(void) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/