Commit 494d64af by Keith Seitz Committed by Keith Seitz

gc.h (GC_is_thread_suspended): Declare.

        * include/gc.h (GC_is_thread_suspended): Declare.
        * pthread_stop_world.c (GC_is_thread_suspended): New function.

From-SVN: r124081
parent f749a55b
2007-04-23 Keith Seitz <keiths@redhat.com>
* include/gc.h (GC_is_thread_suspended): Declare.
* pthread_stop_world.c (GC_is_thread_suspended): New function.
2007-04-03 Jakub Jelinek <jakub@redhat.com> 2007-04-03 Jakub Jelinek <jakub@redhat.com>
* configure.ac (NO_EXECUTE_PERMISSION): Set by default. * configure.ac (NO_EXECUTE_PERMISSION): Set by default.
......
...@@ -1085,5 +1085,6 @@ GC_API void GC_register_has_static_roots_callback ...@@ -1085,5 +1085,6 @@ GC_API void GC_register_has_static_roots_callback
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS) && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
GC_API void GC_suspend_thread GC_PROTO((pthread_t)); GC_API void GC_suspend_thread GC_PROTO((pthread_t));
GC_API void GC_resume_thread GC_PROTO((pthread_t)); GC_API void GC_resume_thread GC_PROTO((pthread_t));
GC_API int GC_is_thread_suspended GC_PROTO((pthread_t));
#endif #endif
#endif /* _GC_H */ #endif /* _GC_H */
...@@ -483,6 +483,14 @@ void GC_resume_thread(pthread_t thread) { ...@@ -483,6 +483,14 @@ void GC_resume_thread(pthread_t thread) {
t -> flags &= ~SUSPENDED; 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 */ /* Caller holds allocation lock, and has held it continuously since */
/* the world stopped. */ /* the world stopped. */
void GC_start_world() void GC_start_world()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment