diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-28 12:27:43 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-28 12:27:43 +0000 |
commit | a73ba1def712921b5ab6d13dd8055cbb687c4641 (patch) | |
tree | e255fcb031ce80fd4810454b0b7ee99c34e8dbda | |
parent | 517fd61e142698f8001aec80a61c0d3a139b5cef (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | thread.c | 21 | ||||
-rw-r--r-- | thread_win32.c | 10 | ||||
-rw-r--r-- | thread_win32.h | 10 |
4 files changed, 34 insertions, 25 deletions
@@ -1,3 +1,11 @@ +Mon Jul 28 21:24:33 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * 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@tsg.ne.jp> * test/ruby/test_require.rb (test_require_too_long_filename): @@ -34,9 +42,9 @@ Mon Jul 28 16:06:36 2008 NAKAMURA Usaku <usa@ruby-lang.org> Mon Jul 28 16:01:12 2008 NAKAMURA Usaku <usa@ruby-lang.org> - * 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@ruby-lang.org> @@ -1913,8 +1921,8 @@ Fri Jun 20 03:26:00 2008 NAKAMURA Usaku <usa@ruby-lang.org> Fri Jun 20 03:19:39 2008 Yusuke Endoh <mame@tsg.ne.jp> - * 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. @@ -62,16 +62,6 @@ static double timeofday(void); 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 @@ terminate_i(st_data_t key, st_data_t val, rb_thread_t *main_thread) 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) { diff --git a/thread_win32.c b/thread_win32.c index 3654663cc6..9241d274b0 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -333,6 +333,16 @@ native_mutex_destroy(rb_thread_lock_t *lock) #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) { diff --git a/thread_win32.h b/thread_win32.h index cc982a9afc..ec2930df12 100644 --- a/thread_win32.h +++ b/thread_win32.h @@ -25,16 +25,6 @@ typedef HANDLE rb_thread_id_t; 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; |