2007-01-28 Andreas Tobler <a.tobler@schweiz.org>
authora_tobler <a_tobler>
Sun, 28 Jan 2007 08:40:11 +0000 (08:40 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:39 +0000 (21:06 +0400)
* 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
darwin_stop_world.c
os_dep.c

index 967d8cf..24d8ea8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,24 @@
+2007-01-28  Andreas Tobler  <a.tobler@schweiz.org>
+
+       * 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 <Hans.Boehm@hp.com>
+
        * 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  <a.tobler@schweiz.org>
 
        * darwin_stop_world.c: Move THREAD_FLD defines to ...
index 9981587..3fbf6bb 100644 (file)
@@ -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;
index 9a31b18..1269a2b 100644 (file)
--- 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 <mach/mach.h>
 #include <mach/mach_error.h>
@@ -3454,6 +3454,8 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
 #include <mach/task.h>
 #include <pthread.h>
 
+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;