Make __data_start a weak symbol, to allow loading modules on mips.
[mono.git] / libgc / include / private / pthread_support.h
index d52e4da90aa0983d3e032b5effb065e145e9e25e..076a6d26ff93a912c4d7be62d0210e17f11f1b9d 100644 (file)
@@ -4,10 +4,12 @@
 # include "private/gc_priv.h"
 
 # if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
-     && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
+     && !defined(GC_WIN32_THREADS)
      
 #if defined(GC_DARWIN_THREADS)
 # include "private/darwin_stop_world.h"
+#elif defined(GC_OPENBSD_THREADS)
+# include "private/openbsd_stop_world.h"
 #else
 # include "private/pthread_stop_world.h"
 #endif
@@ -26,6 +28,9 @@ typedef struct GC_Thread_Rep {
                                  /* guaranteed to be dead, but we may  */
                                  /* not yet have registered the join.) */
     pthread_t id;
+#ifdef PLATFORM_ANDROID
+    pid_t kernel_id;
+#endif
     /* Extra bookkeeping information the stopping code uses */
     struct thread_stop_info stop_info;
     
@@ -33,6 +38,7 @@ typedef struct GC_Thread_Rep {
 #      define FINISHED 1       /* Thread has exited.   */
 #      define DETACHED 2       /* Thread is intended to be detached.   */
 #      define MAIN_THREAD 4    /* True for the original thread only.   */
+#       define FOREIGN_THREAD 8 /* Will not be de-registered by us      */
     short thread_blocked;      /* Protected by GC lock.                */
                                /* Treated as a boolean value.  If set, */
                                /* thread will acquire GC lock before   */
@@ -86,12 +92,17 @@ typedef struct GC_Thread_Rep {
 
 # define THREAD_TABLE_SZ 128   /* Must be power of 2   */
 extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
+#ifdef NACL
+extern __thread GC_thread gc_thread_self;
+#endif
 
 extern GC_bool GC_thr_initialized;
 
 GC_thread GC_lookup_thread(pthread_t id);
 
-void GC_stop_init();
+void GC_thread_deregister_foreign (void *data);
+
+void GC_stop_init(void);
 
 extern GC_bool GC_in_thread_creation;
        /* We may currently be in thread creation or destruction.       */