diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-27 15:20:01 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-27 15:20:01 +0000 |
commit | 7b837f9569b67ae8930f4ee03c56124445ef83fa (patch) | |
tree | 67dbd42d733a1685af430b7da550267580e56b86 /vm_core.h | |
parent | 907056163909404f1c35ba0edc07b86a3a9cab24 (diff) | |
download | ruby-7b837f9569b67ae8930f4ee03c56124445ef83fa.tar.gz ruby-7b837f9569b67ae8930f4ee03c56124445ef83fa.tar.xz ruby-7b837f9569b67ae8930f4ee03c56124445ef83fa.zip |
* vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct in
*_free against an object that is going to be free'ed. So, change type
of thread_t#keeping_mutexes from VALUE to mutex_t.
* vm.c: remove mark to keeping_mutexes.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -396,6 +396,8 @@ struct rb_unblock_callback { void *arg; }; +struct rb_mutex_struct; + struct rb_thread_struct { VALUE self; @@ -443,7 +445,7 @@ struct rb_thread_struct rb_thread_lock_t interrupt_lock; struct rb_unblock_callback unblock; VALUE locking_mutex; - VALUE keeping_mutexes; + struct rb_mutex_struct *keeping_mutexes; int transition_for_lock; struct rb_vm_tag *tag; @@ -496,6 +498,15 @@ struct rb_thread_struct int abort_on_exception; }; +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; +}; + /* iseq.c */ VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE); VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE); |