diff options
author | ivmai <ivmai> | 2010-10-12 05:46:27 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:55 +0400 |
commit | 86c10c72afc6ac0750915749b9edd1dc519eea0d (patch) | |
tree | 6f9605f5e3ee9ca21602c387be2c321098e00820 /darwin_stop_world.c | |
parent | e14def4c718743dd1f7e5cf9075f48e8f3691110 (diff) | |
download | bdwgc-86c10c72afc6ac0750915749b9edd1dc519eea0d.tar.gz |
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 'darwin_stop_world.c')
-rw-r--r-- | darwin_stop_world.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c index 0b6830f6..a915d5f7 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -102,12 +102,12 @@ GC_INNER void GC_push_all_stacks(void) int i; kern_return_t kern_return; ptr_t lo, hi; - word total_size = 0; + task_t my_task = current_task(); mach_port_t my_thread = mach_thread_self(); GC_bool found_me = FALSE; int nthreads = 0; + word total_size = 0; mach_msg_type_number_t listcount = (mach_msg_type_number_t)THREAD_TABLE_SZ; - task_t my_task = 0; /* initialized to prevent a warning */ thread_act_array_t act_list = 0; if (!GC_thr_initialized) @@ -115,7 +115,6 @@ GC_INNER void GC_push_all_stacks(void) if (GC_query_task_threads) { /* Obtain the list of the threads from the kernel. */ - my_task = current_task(); kern_return = task_threads(my_task, &act_list, &listcount); if (kern_return != KERN_SUCCESS) ABORT("task_threads failed"); |