diff options
Diffstat (limited to 'thread_pthread.h')
-rw-r--r-- | thread_pthread.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/thread_pthread.h b/thread_pthread.h index 97a26e0e80..781712c3f6 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -35,11 +35,17 @@ typedef struct native_thread_data_struct { #include <semaphore.h> typedef struct rb_global_vm_lock_struct { + /* fast path */ + unsigned long acquired; pthread_mutex_t lock; - struct rb_thread_struct * volatile waiting_threads; - struct rb_thread_struct *waiting_last_thread; - int waiting; - int volatile acquired; + + /* slow path */ + unsigned long waiting; + rb_thread_cond_t cond; + + /* yield */ + rb_thread_cond_t switch_cond; + unsigned long need_yield; } rb_global_vm_lock_t; #endif /* RUBY_THREAD_PTHREAD_H */ |