summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-10-12 07:46:27 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:55 +0200
commit86c10c72afc6ac0750915749b9edd1dc519eea0d (patch)
tree6f9605f5e3ee9ca21602c387be2c321098e00820 /pthread_support.c
parente14def4c718743dd1f7e5cf9075f48e8f3691110 (diff)
2010-10-12 Ivan Maidanski <ivmai@mail.ru>
* darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local variable initialization (always call current_task()). * pthread_support.c (GC_thr_init, GC_register_my_thread_inner): Don't set thread's stop_info.stack_ptr value for Darwin.
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pthread_support.c b/pthread_support.c
index f7da172..c28afc8 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -879,8 +879,9 @@ GC_INNER void GC_thr_init(void)
GC_thread t = GC_new_thread(pthread_self());
# ifdef GC_DARWIN_THREADS
t -> stop_info.mach_thread = mach_thread_self();
+# else
+ t -> stop_info.stack_ptr = (ptr_t)(&dummy);
# endif
- t -> stop_info.stack_ptr = (ptr_t)(&dummy);
t -> flags = DETACHED | MAIN_THREAD;
}
@@ -1284,8 +1285,9 @@ STATIC GC_thread GC_register_my_thread_inner(const struct GC_stack_base *sb,
ABORT("Failed to allocate memory for thread registering.");
# ifdef GC_DARWIN_THREADS
me -> stop_info.mach_thread = mach_thread_self();
+# else
+ me -> stop_info.stack_ptr = sb -> mem_base;
# endif
- me -> stop_info.stack_ptr = sb -> mem_base;
me -> stack_end = sb -> mem_base;
if (me -> stack_end == NULL)
ABORT("Bad stack base in GC_register_my_thread");