1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
kosaki 2011-05-06 16:47:38 +00:00
parent 4a9883e92f
commit a1cfaf4b1f
6 changed files with 78 additions and 36 deletions

View file

@ -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;