diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-22 12:09:07 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-22 12:09:07 +0000 |
commit | ed590bdbfc5222d7658fee6a836d046ab17cd1b4 (patch) | |
tree | 792d8be3b8f04e57666e641c9125ad3d9dd0880d /thread_pthread.h | |
parent | 7a6f34103de55678241471aef582a5aa24622496 (diff) | |
download | ruby-ed590bdbfc5222d7658fee6a836d046ab17cd1b4.tar.gz |
thread*: all condvars are monotonic
There's no reason to use CLOCK_REALTIME for any condvars in Ruby.
Indeed, we initialized all condvars with RB_CONDATTR_CLOCK_MONOTONIC
anyway; so simplify our code and reduce ifdefs.
[ruby-core:85639] [Misc #14497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.h')
-rw-r--r-- | thread_pthread.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/thread_pthread.h b/thread_pthread.h index 1c3782caf4..0566193eb5 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -16,14 +16,9 @@ #endif #define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER -#define RB_NATIVETHREAD_COND_INIT { PTHREAD_COND_INITIALIZER, } +#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER -typedef struct rb_thread_cond_struct { - pthread_cond_t cond; -#ifdef HAVE_CLOCKID_T - clockid_t clockid; -#endif -} rb_nativethread_cond_t; +typedef pthread_cond_t rb_nativethread_cond_t; typedef struct native_thread_data_struct { struct list_node ubf_list; |