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
This commit is contained in:
normal 2018-01-09 08:26:43 +00:00
parent e8f40bd8f8
commit 043e1fd559
2 changed files with 2 additions and 6 deletions

View File

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

View File

@ -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
}
/*