diff options
Diffstat (limited to 'thread_pthread.h')
-rw-r--r-- | thread_pthread.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/thread_pthread.h b/thread_pthread.h index e3f09800a3..60e0fe0ea3 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -22,7 +22,19 @@ typedef pthread_cond_t rb_nativethread_cond_t; typedef struct native_thread_data_struct { struct list_node ubf_list; - rb_nativethread_cond_t sleep_cond; +#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; } native_thread_data_t; #undef except |