ruby-changes:49605
From: normal <ko1@a...>
Date: Tue, 9 Jan 2018 17:26:47 +0900 (JST)
Subject: [ruby-changes:49605] normal:r61720 (trunk): thread_pthread: remove checks for pthread_cond*_init
normal 2018-01-09 17:26:43 +0900 (Tue, 09 Jan 2018) New Revision: 61720 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61720 Log: 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] Modified files: trunk/configure.ac trunk/thread_pthread.c Index: configure.ac =================================================================== --- configure.ac (revision 61719) +++ configure.ac (revision 61720) @@ -2966,7 +2966,7 @@ AS_IF([test x"$enable_pthread" = xyes], https://github.com/ruby/ruby/blob/trunk/configure.ac#L2966 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= Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 61719) +++ thread_pthread.c (revision 61720) @@ -55,7 +55,7 @@ static struct { https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L55 #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 *lo https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L261 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_c https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L285 } 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 } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/