diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-06 20:52:44 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-06 20:52:44 +0000 |
| commit | 04fb0a3fed441108a389e36918a42742dc1b866c (patch) | |
| tree | a87024f988f543cb81a6076a3987ccd32c934019 /thread_pthread.c | |
| parent | a4ac4058ecc0affbdfdef7273f930143395c4f53 (diff) | |
| download | ruby-04fb0a3fed441108a389e36918a42742dc1b866c.tar.gz ruby-04fb0a3fed441108a389e36918a42742dc1b866c.tar.xz ruby-04fb0a3fed441108a389e36918a42742dc1b866c.zip | |
* eval_intern.h: Add support to Haiku. see [ruby-core:18110]
* include/ruby/defines.h: ditto.
* configure.in: ditto.
* thread_pthread.c: ditto.
* io.c: ditto.
* lib/mkmf.rb: ditto.
* ext/socket/getaddrinfo.c: ditto.
* ext/socket/extconf.rb: ditto.
* ext/socket/socket.c: ditto.
* ext/socket/addrinfo.h: ditto.
* ext/socket/getnameinfo.c: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
| -rw-r--r-- | thread_pthread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 029ad4300..e9d94e778 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -119,7 +119,11 @@ 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 */ +#else #define native_thread_yield() sched_yield() +#endif #ifndef __CYGWIN__ static void add_signal_thread_list(rb_thread_t *th); @@ -409,7 +413,9 @@ native_thread_create(rb_thread_t *th) CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size)); #endif +#ifndef __HAIKU__ /* not yet available under Haiku */ CHECK_ERR(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED)); +#endif CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)); err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th); |
