1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread_pthread.c (ruby_init_stack): prior STACK_END_ADDRESS if

found.  [ruby-core:17624]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-07-06 15:59:40 +00:00
parent 2754e843b6
commit fc5746681e
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Mon Jul 7 00:59:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (ruby_init_stack): prior STACK_END_ADDRESS if
found. [ruby-core:17624]
Sun Jul 6 23:48:06 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/socket.c (bsock_send, s_recvfrom, ruby_connect, s_accept),

View file

@ -179,6 +179,10 @@ static struct {
#endif
} native_main_thread;
#ifdef STACK_END_ADDRESS
extern void *STACK_END_ADDRESS;
#endif
#undef ruby_init_stack
void
ruby_init_stack(VALUE *addr
@ -188,12 +192,16 @@ ruby_init_stack(VALUE *addr
)
{
native_main_thread.id = pthread_self();
#ifdef STACK_END_ADDRESS
native_main_thread.stack_start = STACK_END_ADDRESS;
#else
if (!native_main_thread.stack_start ||
STACK_UPPER(&addr,
native_main_thread.stack_start > addr,
native_main_thread.stack_start < addr)) {
native_main_thread.stack_start = addr;
}
#endif
#ifdef __ia64
if (!native_main_thread.register_stack_start ||
(VALUE*)bsp < native_main_thread.register_stack_start) {