diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-03 04:17:19 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-03 04:17:19 +0000 |
commit | 44b5a74a9ae22aa08f226b7f1d555fad928a8cf7 (patch) | |
tree | 373806b4bd48a03cd30e5e454e867437118bb79b /thread_pthread.c | |
parent | fb15c0f16c8b1f6a9a9edd9aa9f81e61b0f5ba92 (diff) | |
download | ruby-44b5a74a9ae22aa08f226b7f1d555fad928a8cf7.tar.gz |
* thread_pthread.c: DragonFlyBSD is also the same as FreeBSD
on getting the stack size of the main thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 14da80b9f7..d2d8b04df1 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -12,7 +12,7 @@ #ifdef THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION #include "gc.h" -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly) #include <pthread_np.h> #endif @@ -297,10 +297,10 @@ ruby_init_stack(volatile VALUE *addr #endif { size_t size = 0, space = 0; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly) pthread_attr_t attr; if (pthread_attr_init(&attr) == 0) { - pthread_attr_get_np(native_main_thread.id, &attr) || + if (pthread_attr_get_np(native_main_thread.id, &attr) == 0) pthread_attr_getstacksize(&attr, &size); pthread_attr_destroy(&attr); } |