# define BZERO(x,n) bzero((char *)(x),(int)(n))
# endif
+#if defined(DARWIN)
+# if defined(POWERPC)
+# define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE
+# elif defined(I386)
+# define GC_MACH_THREAD_STATE_FLAVOR i386_THREAD_STATE
+# elif defined(X86_64)
+# define GC_MACH_THREAD_STATE_FLAVOR x86_THREAD_STATE64
+# else
+# define GC_MACH_THREAD_STATE_FLAVOR MACHINE_THREAD_STATE
+# endif
+#endif
+
/* Delay any interrupts or signals that may abort this thread. Data */
/* structures are in a consistent state outside this pair of calls. */
/* ANSI C allows both to be empty (though the standard isn't very */
# define ENABLE_SIGNALS()
# else
# define DISABLE_SIGNALS() GC_disable_signals()
- void GC_disable_signals();
+ void GC_disable_signals(void);
# define ENABLE_SIGNALS() GC_enable_signals()
- void GC_enable_signals();
+ void GC_enable_signals(void);
# endif
# endif
# else
# if defined(GC_SOLARIS_THREADS) || defined(GC_WIN32_THREADS) \
|| defined(GC_PTHREADS)
- void GC_stop_world();
- void GC_start_world();
+ void GC_stop_world(void);
+ void GC_start_world(void);
# define STOP_WORLD() GC_stop_world()
# define START_WORLD() GC_start_world()
# else
# define MAP_SIZE MAP_ENTRIES
# define CPP_MAX_OFFSET (OFFSET_TOO_BIG - 1)
# define MAX_OFFSET ((word)CPP_MAX_OFFSET)
+# define INIT_MAP(map) memset((map), OBJ_INVALID, MAP_SIZE)
/* The following are used only if GC_all_interior_ptrs != 0 */
# define VALID_OFFSET_SZ \
(CPP_MAX_OFFSET > WORDS_TO_BYTES(CPP_MAXOBJSZ)? \
# ifdef SMALL_CONFIG
# define MAX_HEAP_SECTS 128 /* Roughly 256MB (128*2048*1K) */
# else
-# define MAX_HEAP_SECTS 384 /* Roughly 3GB */
+# define MAX_HEAP_SECTS (384+128) /* Roughly 4GB */
# endif
# endif
struct HeapSect {
# ifdef __DMC__
GC_API void GC_noop(...);
# else
- GC_API void GC_noop();
+ GC_API void GC_noop(void*,...);
# endif
# endif
/* GC_notify_all_builder() is called when GC_fl_builder_count */
/* reaches 0. */
- extern void GC_acquire_mark_lock();
- extern void GC_release_mark_lock();
- extern void GC_notify_all_builder();
+ extern void GC_acquire_mark_lock(void);
+ extern void GC_release_mark_lock(void);
+ extern void GC_notify_all_builder(void);
/* extern void GC_wait_builder(); */
- extern void GC_wait_for_reclaim();
+ extern void GC_wait_for_reclaim(void);
extern word GC_fl_builder_count; /* Protected by mark lock. */
# endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
# ifdef PARALLEL_MARK
- extern void GC_notify_all_marker();
- extern void GC_wait_marker();
+ extern void GC_notify_all_marker(void);
+ extern void GC_wait_marker(void);
extern word GC_mark_no; /* Protected by mark lock. */
extern void GC_help_marker(word my_mark_no);
/* in Linux glibc, but it's not exported.) Thus we continue to use */
/* the same hard-coded signals we've always used. */
# if !defined(SIG_SUSPEND)
-# if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
+# if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS) || defined(GC_NETBSD_THREADS)
# if defined(SPARC) && !defined(SIGPWR)
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
* It is aliased to SIGLOST in asm/signal.h, though. */
# define SIG_SUSPEND SIGLOST
+# elif defined(NACL)
+# define SIG_SUSPEND 0
# else
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR