+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.
+
2010-10-10 Ivan Maidanski <ivmai@mail.ru>
* darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
* win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
DllMain): Don't define if GC_NO_DLLMAIN.
* win32_threads.c (GC_stop_world): Declare "i" and "max" local
- vars only if not GC_NO_DLLMAIN (to suppress compiler warning).
+ variables only if not GC_NO_DLLMAIN (to suppress compiler
+ warning).
* win32_threads.c (GC_mark_thread, start_mark_threads): Use
CreateThread() instead of _beginthreadex() for WinCE.
* win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
(define as "strtoul" for most targets except for LLP64/Win64).
* misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
(cast the result to word type) to decode values of "GC_TRACE",
- "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment vars.
+ "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
+ variables.
2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly George Talbot)
corresponding compiler warning.
* ptr_chck.c (GC_is_visible): cast int const to word type to
prevent left shift overflow.
- * os_dep.c: change the type of GC_mem_top_down global var
+ * os_dep.c: change the type of GC_mem_top_down global variable
(containing a flag) to DWORD.
* include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
is defined on SunOS x86_64.
* backgraph.c: cast GC_gc_no value to unsigned short when
assigned/compared to height_gc_no field of back_edges.
* os_dep.c (GC_remove_protection): Add ARGSUSED.
- * win32_threads.c (GC_thread_exit_proc): Remove unused local var.
+ * win32_threads.c (GC_thread_exit_proc): Remove unused local
+ variable.
* mark.c (GC_check_dirty): Move declaration out of func body.
2008-11-06 Hans Boehm <Hans.Boehm@hp.com>
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)
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");
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;
}
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");