Merge pull request #733 from amoiseev-softheme/bugfix/monofix
[mono.git] / libgc / include / private / gc_priv.h
index cc0410d441f6955906f8473fa971ed76224ebc98..e0a9331292ced0e6074f23d07819ac4ce9574421 100644 (file)
@@ -371,6 +371,8 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
 #              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
@@ -401,9 +403,9 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
 #     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
 
@@ -423,8 +425,8 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
 # 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
@@ -940,6 +942,7 @@ struct _GC_arrays {
 #   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)? \
@@ -982,7 +985,7 @@ struct _GC_arrays {
 #   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 {
@@ -1839,7 +1842,7 @@ void GC_dump GC_PROTO((void));
 #   ifdef __DMC__
       GC_API void GC_noop(...);
 #   else
-      GC_API void GC_noop();
+      GC_API void GC_noop(void*,...);
 #   endif
 # endif
 
@@ -1928,17 +1931,17 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
     /* 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);
@@ -1956,11 +1959,13 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
   /* 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