mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (shutdown, sched_yield, pthread_attr_setinheritsched):
check for Haiku. * eval_intern.h, io.c, thread_pthread.c: use autoconfisticated results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b68b9ec698
commit
1c22ef1705
4 changed files with 31 additions and 21 deletions
|
@ -119,10 +119,10 @@ native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
|||
|
||||
#define native_cleanup_push pthread_cleanup_push
|
||||
#define native_cleanup_pop pthread_cleanup_pop
|
||||
#ifdef __HAIKU__
|
||||
#define native_thread_yield() /* not available under Haiku */
|
||||
#ifdef HAVE_SCHED_YIELD
|
||||
#define native_thread_yield() (void)sched_yield()
|
||||
#else
|
||||
#define native_thread_yield() sched_yield()
|
||||
#define native_thread_yield() ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
|
@ -413,7 +413,7 @@ native_thread_create(rb_thread_t *th)
|
|||
CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size));
|
||||
#endif
|
||||
|
||||
#ifndef __HAIKU__ /* not yet available under Haiku */
|
||||
#ifdef HAVE_PTHREAD_ATTR_SETINHERITSCHED
|
||||
CHECK_ERR(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED));
|
||||
#endif
|
||||
CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue