diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-08 08:03:19 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-08 08:03:19 +0000 |
| commit | 2259de54d6e6eedcbff6e8c921b95fa2bb1ea067 (patch) | |
| tree | bc4c7d00dae629a4915fa4b1d0c86a55e5b2d4f6 /thread_pthread.c | |
| parent | 7efe637718642c4772558a38b6c77cd830312520 (diff) | |
| download | ruby-2259de54d6e6eedcbff6e8c921b95fa2bb1ea067.tar.gz ruby-2259de54d6e6eedcbff6e8c921b95fa2bb1ea067.tar.xz ruby-2259de54d6e6eedcbff6e8c921b95fa2bb1ea067.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@18439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
| -rw-r--r-- | thread_pthread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index e9d94e778..bf3dd96ba 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -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)); |
