diff options
Diffstat (limited to 'thread_pthread.h')
-rw-r--r-- | thread_pthread.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/thread_pthread.h b/thread_pthread.h index 60e0fe0ea3..0566193eb5 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -22,19 +22,7 @@ typedef pthread_cond_t rb_nativethread_cond_t; typedef struct native_thread_data_struct { struct list_node ubf_list; -#if defined(__GLIBC__) || defined(__FreeBSD__) - union -#else - /* - * assume the platform condvars are badly implemented and have a - * "memory" of which mutex they're associated with - */ - struct -#endif - { - rb_nativethread_cond_t intr; /* th->interrupt_lock */ - rb_nativethread_cond_t gvlq; /* vm->gvl.lock */ - } cond; + rb_nativethread_cond_t sleep_cond; } native_thread_data_t; #undef except @@ -44,12 +32,12 @@ typedef struct native_thread_data_struct { typedef struct rb_global_vm_lock_struct { /* fast path */ - const struct rb_thread_struct *acquired; + unsigned long acquired; rb_nativethread_lock_t lock; /* slow path */ - struct list_head waitq; - const struct rb_thread_struct *timer; + volatile unsigned long waiting; + rb_nativethread_cond_t cond; /* yield */ rb_nativethread_cond_t switch_cond; |