summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 08:26:43 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 08:26:43 +0000
commit043e1fd559f0675b242cd50fe82256083e3257db (patch)
tree59bc38fba6f61c1e2855496bd8d4e4de7e71e0cb /thread_pthread.c
parente8f40bd8f83e1b22ef9c22f0e5d7a1fc0b07f94c (diff)
downloadruby-043e1fd559f0675b242cd50fe82256083e3257db.tar.gz
thread_pthread: remove checks for pthread_cond*_init
These were added for NaCL support in r36022, and we dropped NaCL in r60374. IMHO, any pthreads implementation without these basic functions is not worth the time to support. [ruby-core:84758] [Misc #14342] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 9d27ddb623..3f4310dbfb 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -55,7 +55,7 @@ static struct {
#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(HAVE_CLOCKID_T) && \
defined(CLOCK_REALTIME) && defined(CLOCK_MONOTONIC) && \
- defined(HAVE_CLOCK_GETTIME) && defined(HAVE_PTHREAD_CONDATTR_INIT)
+ defined(HAVE_CLOCK_GETTIME)
#define USE_MONOTONIC_COND 1
#else
#define USE_MONOTONIC_COND 0
@@ -261,7 +261,6 @@ native_mutex_destroy(pthread_mutex_t *lock)
static void
native_cond_initialize(rb_nativethread_cond_t *cond, int flags)
{
-#ifdef HAVE_PTHREAD_COND_INIT
int r;
# if USE_MONOTONIC_COND
pthread_condattr_t attr;
@@ -286,18 +285,15 @@ native_cond_initialize(rb_nativethread_cond_t *cond, int flags)
}
return;
-#endif
}
static void
native_cond_destroy(rb_nativethread_cond_t *cond)
{
-#ifdef HAVE_PTHREAD_COND_INIT
int r = pthread_cond_destroy(&cond->cond);
if (r != 0) {
rb_bug_errno("pthread_cond_destroy", r);
}
-#endif
}
/*