$OpenBSD: patch-pthread_stop_world_c,v 1.3 2013/06/01 21:05:28 kurt Exp $
--- pthread_stop_world.c.orig	Thu Aug  9 16:25:13 2012
+++ pthread_stop_world.c	Tue Mar 19 19:41:04 2013
@@ -35,7 +35,7 @@ GC_INNER __thread GC_thread GC_nacl_gc_thread_self = N
 int GC_nacl_thread_parked[MAX_NACL_GC_THREADS];
 int GC_nacl_thread_used[MAX_NACL_GC_THREADS];
 
-#elif !defined(GC_OPENBSD_THREADS)
+#elif !defined(GC_OPENBSD_UTHREADS)
 
 #include <signal.h>
 #include <semaphore.h>
@@ -298,7 +298,7 @@ STATIC void GC_restart_handler(int sig)
 # endif
 }
 
-#endif /* !GC_OPENBSD_THREADS && !NACL */
+#endif /* !GC_OPENBSD_UTHREADS && !NACL */
 
 #ifdef IA64
 # define IF_IA64(x) x
@@ -422,7 +422,7 @@ STATIC int GC_suspend_all(void)
 
 # ifndef NACL
     GC_thread p;
-#   ifndef GC_OPENBSD_THREADS
+#   ifndef GC_OPENBSD_UTHREADS
       int result;
 #   endif
     pthread_t self = pthread_self();
@@ -436,7 +436,7 @@ STATIC int GC_suspend_all(void)
         if (!THREAD_EQUAL(p -> id, self)) {
             if (p -> flags & FINISHED) continue;
             if (p -> thread_blocked) /* Will wait */ continue;
-#           ifndef GC_OPENBSD_THREADS
+#           ifndef GC_OPENBSD_UTHREADS
               if (p -> stop_info.last_stop_count == GC_stop_count) continue;
               n_live_threads++;
 #           endif
@@ -445,7 +445,7 @@ STATIC int GC_suspend_all(void)
                             (unsigned)(p -> id));
 #           endif
 
-#           ifdef GC_OPENBSD_THREADS
+#           ifdef GC_OPENBSD_UTHREADS
               {
                 stack_t stack;
                 if (pthread_suspend_np(p -> id) != 0)
@@ -523,7 +523,7 @@ STATIC int GC_suspend_all(void)
 
 GC_INNER void GC_stop_world(void)
 {
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
+# if !defined(GC_OPENBSD_UTHREADS) && !defined(NACL)
     int i;
     int n_live_threads;
     int code;
@@ -545,7 +545,7 @@ GC_INNER void GC_stop_world(void)
     }
 # endif /* PARALLEL_MARK */
 
-# if defined(GC_OPENBSD_THREADS) || defined(NACL)
+# if defined(GC_OPENBSD_UTHREADS) || defined(NACL)
     (void)GC_suspend_all();
 # else
     AO_store(&GC_stop_count, GC_stop_count+1);
@@ -735,7 +735,7 @@ GC_INNER void GC_start_world(void)
     pthread_t self = pthread_self();
     register int i;
     register GC_thread p;
-#   ifndef GC_OPENBSD_THREADS
+#   ifndef GC_OPENBSD_UTHREADS
       register int n_live_threads = 0;
       register int result;
 #   endif
@@ -747,7 +747,7 @@ GC_INNER void GC_start_world(void)
       GC_log_printf("World starting\n");
 #   endif
 
-#   ifndef GC_OPENBSD_THREADS
+#   ifndef GC_OPENBSD_UTHREADS
       AO_store(&GC_world_is_stopped, FALSE);
 #   endif
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
@@ -755,7 +755,7 @@ GC_INNER void GC_start_world(void)
         if (!THREAD_EQUAL(p -> id, self)) {
             if (p -> flags & FINISHED) continue;
             if (p -> thread_blocked) continue;
-#           ifndef GC_OPENBSD_THREADS
+#           ifndef GC_OPENBSD_UTHREADS
               n_live_threads++;
 #           endif
 #           ifdef DEBUG_THREADS
@@ -763,7 +763,7 @@ GC_INNER void GC_start_world(void)
                             (unsigned)(p -> id));
 #           endif
 
-#         ifdef GC_OPENBSD_THREADS
+#         ifdef GC_OPENBSD_UTHREADS
             if (pthread_resume_np(p -> id) != 0)
               ABORT("pthread_resume_np failed");
 #         else
@@ -810,7 +810,7 @@ GC_INNER void GC_start_world(void)
 
 GC_INNER void GC_stop_init(void)
 {
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
+# if !defined(GC_OPENBSD_UTHREADS) && !defined(NACL)
     struct sigaction act;
 
     if (sem_init(&GC_suspend_ack_sem, GC_SEM_INIT_PSHARED, 0) != 0)
@@ -873,7 +873,7 @@ GC_INNER void GC_stop_init(void)
     if (GC_print_stats && GC_retry_signals) {
       GC_log_printf("Will retry suspend signal if necessary\n");
     }
-# endif /* !GC_OPENBSD_THREADS && !NACL */
+# endif /* !GC_OPENBSD_UTHREADS && !NACL */
 }
 
 #endif
