summaryrefslogtreecommitdiff
path: root/thread_pthread.h
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-04 07:17:03 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-04 07:17:03 +0000
commitb323b86b6b3a7283617b72b45521c554dba930c9 (patch)
tree8a245b8c30c894a66cb5ef29fb2237a93aa15c0c /thread_pthread.h
parent669862a416ce92dfee6b677e35144e7b8db1cb19 (diff)
* thread_pthread.c (native_thread_init_stack): use get_stack.
patched by KOSAKI Motohiro [ruby-dev:40309] * thread_pthread.c (ruby_init_stack): use get_stack on platforms which have pthread_attr_get_np. (FreeBSD, DragonFlyBSD and NetBSD) This is because FreeBSD and DragonFly BSD must use pthread_attr_get_np to get stack size of main thread, but Mac OS X and Linux with LinuxThreads must use getrlimit. <http://www.nminoru.jp/~nminoru/programming/stackoverflow_handling.html> <http://d.hatena.ne.jp/nurse/20100204> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.h')
-rw-r--r--thread_pthread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/thread_pthread.h b/thread_pthread.h
index 04254d7312..94658d4e0c 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -12,6 +12,9 @@
#define RUBY_THREAD_PTHREAD_H
#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
typedef pthread_t rb_thread_id_t;
typedef pthread_mutex_t rb_thread_lock_t;
typedef pthread_cond_t rb_thread_cond_t;