diff options
author | tarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 12:34:15 +0000 |
---|---|---|
committer | tarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 12:34:15 +0000 |
commit | f5dc27aa77f77e68086d9300c7dfe1a3280c7714 (patch) | |
tree | f6a27c01ecdce575415057ecd9dcb62fa32bafe4 /vm_core.h | |
parent | ac93d931fa8c089a4fa6cbafb5727829161ea22e (diff) |
* thread.c (thread_join_sleep): check spurious wakeup by itself for
corresponding status change in trap context.
* vm_core.h (struct rb_thread_struct): add rb_thread_list_t and use as join_list for
reentry by trap context.
* thread.c (thread_start_func_2): ditto.
* thread.c (remove_from_join_list): ditto.
* thread.c (rb_thread_atfork): ditto.
* thread.c (thread_join): ditto. & remove trap handler check.
* thread.c (sleep_forever): add argument : spurious_check.
* thread.c (sleep_timeval): ditto.
* thread.c (rb_thread_sleep_forever): set spurious_check.
* thread.c (rb_thread_sleep_deadly): ditto.
* thread.c (sleep_for_polling): ditto.
* thread.c (rb_thread_wait_for): ditto.
* thread.c (sleep_wait_for_interrupt): bypass spurious_check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -457,6 +457,13 @@ struct rb_mutex_struct; #define ALT_STACK_SIZE (4*1024) #endif +struct rb_thread_struct; +typedef struct rb_thread_list_struct{ + struct rb_thread_list_struct *next; + struct rb_thread_struct *th; +} rb_thread_list_t; + + typedef struct rb_thread_struct { VALUE self; rb_vm_t *vm; @@ -546,8 +553,7 @@ typedef struct rb_thread_struct { /* storage */ st_table *local_storage; - struct rb_thread_struct *join_list_next; - struct rb_thread_struct *join_list_head; + rb_thread_list_t *join_list; VALUE first_proc; VALUE first_args; |