mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
669862a416
commit
b323b86b6b
3 changed files with 32 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue