From a1cfaf4b1f199d078f5168dcbc37a83250666ed4 Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 6 May 2011 16:47:38 +0000 Subject: * thread_pthread.h (rb_thread_cond_t): add clockid field. it's no longer an alias of pthread_cond_t. * thread_pthread.c: adapt new rb_thread_cond_t type. * thread.c (mutex_alloc): ditto. * thread_win32.c (native_cond_initialize): ditto. * configure.in: add check for pthread_cond_attr_setclock() and clockid_t type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'thread_pthread.h') diff --git a/thread_pthread.h b/thread_pthread.h index 3742cb2848..64a17fcf67 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -17,12 +17,16 @@ #endif typedef pthread_t rb_thread_id_t; typedef pthread_mutex_t rb_thread_lock_t; -typedef pthread_cond_t rb_thread_cond_t; + +typedef struct rb_thread_cond_struct { + pthread_cond_t cond; + clockid_t clockid; +} rb_thread_cond_t; typedef struct native_thread_data_struct { void *signal_thread_list; - pthread_cond_t sleep_cond; - pthread_cond_t gvl_cond; + rb_thread_cond_t sleep_cond; + rb_thread_cond_t gvl_cond; struct rb_thread_struct *gvl_next; } native_thread_data_t; -- cgit v1.2.1