+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
# 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;
+/*
+ * 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 {
int already_suspended;
};
-void GC_darwin_register_mach_handler_thread(mach_port_t thread);
-
#endif
# 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"
#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 *);
#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;