+2010-09-03 Ivan Maidanski <ivmai@mail.ru>
+
+ * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
+ * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
+ to GC_bool.
+ * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
+ Simplify the expressions involving GC_use_mach_handler_thread.
+ * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
+ Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
+
2010-09-02 Ivan Maidanski <ivmai@mail.ru>
* include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
Declare new types if needed.
* pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
- * pthread_support.c (GC_init_real_syms): Initialise pointers to
+ * pthread_support.c (GC_init_real_syms): Initialize pointers to
the "real" pthread_cancel and pthread_exit (only if
GC_PTHREAD_EXIT_ATTRIBUTE).
* pthread_support.c (GC_unregister_my_thread): Enable collections
2010-03-23 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn)
- * Makefile.am (check_LTLIBRARIES): Initialise to empty.
+ * Makefile.am (check_LTLIBRARIES): Initialize to empty.
* tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
* tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
* Copyright (c) 1994 by Xerox Corporation. All rights reserved.
* Copyright (c) 1996 by Silicon Graphics. All rights reserved.
* Copyright (c) 1998 by Fergus Henderson. All rights reserved.
- * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * Copyright (c) 2000-2010 by Hewlett-Packard Development Company.
* All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
#endif /* !DARWIN_DONT_PARSE_STACK */
STATIC mach_port_t GC_mach_handler_thread = 0;
-STATIC int GC_use_mach_handler_thread = 0;
+STATIC GC_bool GC_use_mach_handler_thread = FALSE;
static struct GC_mach_thread GC_mach_threads[THREAD_TABLE_SZ];
STATIC int GC_mach_threads_count = 0;
changed = 1;
}
- if (thread != my_thread
- && (!GC_use_mach_handler_thread
- || (GC_use_mach_handler_thread
- && GC_mach_handler_thread != thread))) {
+ if (thread != my_thread && (!GC_use_mach_handler_thread
+ || GC_mach_handler_thread != thread)) {
struct thread_basic_info info;
mach_msg_type_number_t outCount = THREAD_INFO_MAX;
kern_return_t kern_result = thread_info(thread, THREAD_BASIC_INFO,
kern_result = task_threads(my_task, &act_list, &listcount);
for(i = 0; i < listcount; i++) {
thread_act_t thread = act_list[i];
- if (thread != my_thread
- && (!GC_use_mach_handler_thread
- || (GC_use_mach_handler_thread
- && GC_mach_handler_thread != thread))) {
+ if (thread != my_thread && (!GC_use_mach_handler_thread
+ || GC_mach_handler_thread != thread)) {
for(j = 0; j < GC_mach_threads_count; j++) {
if (thread == GC_mach_threads[j].thread) {
if (GC_mach_threads[j].already_suspended) {
# ifdef DEBUG_THREADS
- GC_printf("Not resuming already suspended thread %p\n", thread);
+ GC_printf("Not resuming already suspended thread %p\n",
+ thread);
# endif
continue;
}
if(kern_result != KERN_SUCCESS)
ABORT("thread_info failed");
# ifdef DEBUG_THREADS
- GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread,
- info.run_state);
+ GC_printf("Thread state for 0x%lx = %d\n",
+ (unsigned long)thread, info.run_state);
GC_printf("Resuming 0x%lx\n", (unsigned long)thread);
# endif
/* Resume the thread */
GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread)
{
GC_mach_handler_thread = thread;
- GC_use_mach_handler_thread = 1;
+ GC_use_mach_handler_thread = TRUE;
}
#endif