diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-09 08:26:43 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-09 08:26:43 +0000 |
commit | 043e1fd559f0675b242cd50fe82256083e3257db (patch) | |
tree | 59bc38fba6f61c1e2855496bd8d4e4de7e71e0cb | |
parent | e8f40bd8f83e1b22ef9c22f0e5d7a1fc0b07f94c (diff) |
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
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | thread_pthread.c | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 37e50fe47d..73d83b66b1 100644 --- a/configure.ac +++ b/configure.ac @@ -2966,7 +2966,7 @@ AS_IF([test x"$enable_pthread" = xyes], [ pthread_attr_get_np pthread_attr_getstack \ pthread_get_stackaddr_np pthread_get_stacksize_np \ thr_stksegment pthread_stackseg_np pthread_getthrds_np \ - pthread_cond_init pthread_condattr_setclock pthread_condattr_init \ + pthread_condattr_setclock \ pthread_sigmask pthread_setname_np pthread_set_name_np) AS_CASE(["$target_os"],[aix*],[ac_cv_func_pthread_getattr_np=no],[AC_CHECK_FUNCS(pthread_getattr_np)]) set_current_thread_name= 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 } /* |