From dad14230b898acaebd74e1d56361e9948672e1ce Mon Sep 17 00:00:00 2001 From: a_tobler Date: Sun, 28 Jan 2007 08:40:11 +0000 Subject: [PATCH] 2007-01-28 Andreas Tobler * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings. Make i unsigned. (GC_stop_world): Likewise. Remove unused GC_thread p. (GC_start_world): Likewise. * os_dep.c: Define GC_darwin_register_mach_handler_thread extern. Remove double SIG_HNDLR_PTR definition. (GC_forward_exception): Fix compiler warnings, make i unsigned. Initialize thread_state to NULL. (catch_exception_raise): Fix compiler warnings, make i unsigned. --- ChangeLog | 16 +++++++++++++++- darwin_stop_world.c | 11 +++++------ os_dep.c | 11 ++++++----- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 967d8cfc..24d8ea87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,24 @@ +2007-01-28 Andreas Tobler + + * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings. + Make i unsigned. + (GC_stop_world): Likewise. Remove unused GC_thread p. + (GC_start_world): Likewise. + + * os_dep.c: Define GC_darwin_register_mach_handler_thread extern. + Remove double SIG_HNDLR_PTR definition. + (GC_forward_exception): Fix compiler warnings, make i unsigned. + Initialize thread_state to NULL. + (catch_exception_raise): Fix compiler warnings, make i unsigned. + 2007-01-25 Petr Salinger and Hans Boehm + * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant): also define for X86_64. * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case. * configure: Regenerate. * README.changes: Point to ChangeLog. - + 2007-01-25 Andreas Tobler * darwin_stop_world.c: Move THREAD_FLD defines to ... diff --git a/darwin_stop_world.c b/darwin_stop_world.c index 99815878..3fbf6bba 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -196,8 +196,8 @@ void GC_push_all_stacks() { #else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */ void GC_push_all_stacks() { - int i; - task_t my_task; + unsigned int i; + task_t my_task; kern_return_t r; mach_port_t me; ptr_t lo, hi; @@ -435,8 +435,7 @@ int GC_suspend_thread_list(thread_act_array_t act_list, int count, /* Caller holds allocation lock. */ void GC_stop_world() { - int i, changes; - GC_thread p; + unsigned int i, changes; task_t my_task = current_task(); mach_port_t my_thread = mach_thread_self(); kern_return_t kern_result; @@ -524,8 +523,8 @@ void GC_start_world() { task_t my_task = current_task(); mach_port_t my_thread = mach_thread_self(); - int i, j; - GC_thread p; + unsigned int i; + int j; kern_return_t kern_result; thread_act_array_t act_list; mach_msg_type_number_t listcount; diff --git a/os_dep.c b/os_dep.c index 9a31b189..1269a2b5 100644 --- a/os_dep.c +++ b/os_dep.c @@ -3445,7 +3445,7 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree) /* The bug that caused all this trouble should now be fixed. This should eventually be removed if all goes well. */ -/* define BROKEN_EXCEPTION_HANDLING */ +/* #define BROKEN_EXCEPTION_HANDLING */ #include #include @@ -3454,6 +3454,8 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree) #include #include +extern void GC_darwin_register_mach_handler_thread(mach_port_t); + /* These are not defined in any header, although they are documented */ extern boolean_t exc_server(mach_msg_header_t *, mach_msg_header_t *); @@ -3665,7 +3667,6 @@ static void *GC_mprotect_thread(void *arg) meaningless and safe to ignore. */ #ifdef BROKEN_EXCEPTION_HANDLING -typedef void (* SIG_HNDLR_PTR)(); static SIG_HNDLR_PTR GC_old_bus_handler; /* Updates to this aren't atomic, but the SIGBUSs seem pretty rare. @@ -3778,13 +3779,13 @@ static kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task, exception_data_t data, mach_msg_type_number_t data_count) { - int i; + unsigned int i; kern_return_t r; mach_port_t port; exception_behavior_t behavior; thread_state_flavor_t flavor; - thread_state_t thread_state; + thread_state_t thread_state = NULL; mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX; for(i=0; i < GC_old_exc_ports.count; i++) @@ -3845,7 +3846,7 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread, kern_return_t r; char *addr; struct hblk *h; - int i; + unsigned int i; # if defined(POWERPC) # if CPP_WORDSZ == 32 thread_state_flavor_t flavor = PPC_EXCEPTION_STATE; -- 2.40.0