OSDN Git Service

* config/rs6000/rs6000.c (rs6000_emit_stack_reset): Delete redundant
[pf3gnuchains/gcc-fork.git] / boehm-gc / pthread_stop_world.c
index de64776..bc3c901 100644 (file)
@@ -124,7 +124,7 @@ sem_t GC_suspend_ack_sem;
 
 void GC_suspend_handler_inner(ptr_t sig_arg);
 
-#if defined(IA64) || defined(HP_PA)
+#if defined(IA64) || defined(HP_PA) || defined(M68K)
 extern void GC_with_callee_saves_pushed();
 
 void GC_suspend_handler(int sig)
@@ -483,6 +483,14 @@ void GC_resume_thread(pthread_t thread) {
   t -> flags &= ~SUSPENDED;
 }
 
+int GC_is_thread_suspended(pthread_t thread) {
+  GC_thread t = GC_lookup_thread(thread);
+  if (t == NULL)
+    ABORT("querying suspension state of unknown thread");
+
+  return (t -> flags & SUSPENDED);
+}
+
 /* Caller holds allocation lock, and has held it continuously since    */
 /* the world stopped.                                                  */
 void GC_start_world()