diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-27 09:01:21 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-27 09:01:21 +0000 |
| commit | 8b68dee2aad81dc2594bb769f736226a597c822f (patch) | |
| tree | a73cd6454a0254a7ac2e296c0605c1e79a122762 | |
| parent | 63068eafa8a5085e4a26f6c801276e18ed2476bf (diff) | |
| download | ruby-8b68dee2aad81dc2594bb769f736226a597c822f.tar.gz ruby-8b68dee2aad81dc2594bb769f736226a597c822f.tar.xz ruby-8b68dee2aad81dc2594bb769f736226a597c822f.zip | |
* gc.c (ruby_get_stack_grow_direction): no needs to use thread
here, and not initialized yet. [ruby-core:22439]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | gc.c | 6 | ||||
| -rw-r--r-- | thread_pthread.c | 2 |
3 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Fri Feb 27 18:01:20 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * gc.c (ruby_get_stack_grow_direction): no needs to use thread + here, and not initialized yet. [ruby-core:22439] + Fri Feb 27 17:45:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (file_load_ok): checks if regular file, except for the @@ -1102,10 +1102,10 @@ int ruby_stack_grow_direction; int ruby_get_stack_grow_direction(VALUE *addr) { - rb_thread_t *th = GET_THREAD(); - SET_STACK_END; + VALUE *end; + SET_MACHINE_STACK_END(&end); - if (STACK_END > addr) return ruby_stack_grow_direction = 1; + if (end > addr) return ruby_stack_grow_direction = 1; return ruby_stack_grow_direction = -1; } #endif diff --git a/thread_pthread.c b/thread_pthread.c index cb9511e00..91c5b42d6 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -275,7 +275,7 @@ ruby_init_stack(VALUE *addr native_main_thread.stack_start = STACK_END_ADDRESS; #else if (!native_main_thread.stack_start || - STACK_UPPER(&addr, + STACK_UPPER((VALUE *)(void *)&addr, native_main_thread.stack_start > addr, native_main_thread.stack_start < addr)) { native_main_thread.stack_start = addr; |
