]> granicus.if.org Git - gc/commitdiff
2009-10-23 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Fri, 23 Oct 2009 10:23:41 +0000 (10:23 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:51 +0000 (21:06 +0400)
* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
Use GC_INNER for the function definition.
* include/private/darwin_stop_world.h
(GC_darwin_register_mach_handler_thread): Remove the prototype.
* include/private/darwin_stop_world.h: Add copyright header.
* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
for the function prototype.
* include/private/gc_priv.h (NDEBUG): Explicitly define if
NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
inclusion).

ChangeLog
darwin_stop_world.c
include/private/darwin_stop_world.h
include/private/gc_priv.h
os_dep.c

index 95909b527ed5302b2dd0c67fbbb9722bab76de28..8c66c142db825fb93b2136812c702cd92a3a0cf9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-23  Ivan Maidanski <ivmai@mail.ru>
+
+       * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
+       Use GC_INNER for the function definition.
+       * include/private/darwin_stop_world.h
+       (GC_darwin_register_mach_handler_thread): Remove the prototype.
+       * include/private/darwin_stop_world.h: Add copyright header.
+       * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
+       for the function prototype.
+       * include/private/gc_priv.h (NDEBUG): Explicitly define if
+       NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
+       inclusion).
+
 2009-10-22  Ivan Maidanski <ivmai@mail.ru>
 
        * include/private/gcconfig.h: Move DebugBreak() workaround (for
index 5194af273e310bb5252ff1456fd35af8e554776b..9f9f7be23eaba77804d50ea6fee7d2f8e2b9d54d 100644 (file)
@@ -666,7 +666,7 @@ GC_INNER void GC_start_world(void)
 #   endif
 }
 
-void GC_darwin_register_mach_handler_thread(mach_port_t 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;
index f6f5314ee315a5410cade12e06a7045214bfda05..d726df55b46670c3e8a0f8b6305868089270cdb5 100644 (file)
@@ -1,15 +1,32 @@
+/*
+ * 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.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #ifndef GC_DARWIN_STOP_WORLD_H
 #define GC_DARWIN_STOP_WORLD_H
 
 #if !defined(GC_DARWIN_THREADS)
-#error darwin_stop_world.h included without GC_DARWIN_THREADS defined
+# error darwin_stop_world.h included without GC_DARWIN_THREADS defined
 #endif
 
 #include <mach/mach.h>
 #include <mach/thread_act.h>
 
 struct thread_stop_info {
-    mach_port_t mach_thread;
+  mach_port_t mach_thread;
 };
 
 struct GC_mach_thread {
@@ -17,6 +34,4 @@ struct GC_mach_thread {
   int already_suspended;
 };
 
-void GC_darwin_register_mach_handler_thread(mach_port_t thread);
-
 #endif
index d109fc794e0d8df91610073a8415e5e3e9158c54..34da17629dba6fbbeaea3e3cf18eb990baa0bad4 100644 (file)
 # define _USING_POSIX4A_DRAFT10 1
 #endif
 
+# if defined(NO_DEBUGGING) && !defined(GC_ASSERTIONS) && !defined(NDEBUG)
+    /* To turn off assertion checking (in atomic_ops.h). */
+#   define NDEBUG 1
+# endif
+
 #ifndef GC_H
 # define GC_I_HIDE_POINTERS /* to get GC_HIDE_POINTER() and friends */
 # include "../gc.h"
index 67067d4bbd0b0d28a3ff41dc4d49927c9bab191a..e0e007e97a083bd8c1faf846ac2421087a51df11 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -3628,8 +3628,6 @@ GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
 #include <mach/task.h>
 #include <pthread.h>
 
-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 *);
@@ -3749,6 +3747,8 @@ GC_INNER void GC_mprotect_resume(void)
 #define GC_mprotect_state GC_MP_NORMAL
 #endif
 
+GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread);
+
 STATIC void *GC_mprotect_thread(void *arg)
 {
   mach_msg_return_t r;