diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2015-10-29 20:33:48 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2015-11-20 01:37:52 +0300 |
commit | 9f48082eafc4d54ca33390a72924715b03d7c1dd (patch) | |
tree | 9d508a0056c8ebab09d02f283eaf1ba3d311adab /doc | |
parent | d34d5b53d67b3ef6fa2d70a945e21f023cb9e3e7 (diff) | |
download | bdwgc-9f48082eafc4d54ca33390a72924715b03d7c1dd.tar.gz |
Code refactoring of thread suspend/resume API support
* CMakeLists.txt (enable_gcj_support): Define GC_ENABLE_SUSPEND_THREAD.
* configure.ac (enable_gcj_support): Likewise.
* doc/README.macros (GC_ENABLE_SUSPEND_THREAD): Document.
* include/gc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Move to javaxfc.h.
* include/gc_pthread_redirects.h (GC_SUSPEND_THREAD_ID): New macro.
* include/javaxfc.h (GC_SUSPEND_THREAD_ID): Likewise.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Define if and only if GC_THREADS; refine
comment.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Decorate with GC_CALL; change argument type
from pthread_t to GC_SUSPEND_THREAD_ID.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Likewise.
* pthread_stop_world.c (GC_suspend_handler): Move check for
SUSPENDED_EXT to GC_suspend_handler_inner (to avoid duplicate
GC_lookup_thread call).
* pthread_stop_world.c (suspend_self_inner, GC_TIME_LIMIT,
GC_brief_async_signal_safe_sleep, GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Do not defined unless
GC_ENABLE_SUSPEND_THREAD.
* pthread_stop_world.c (suspend_self): Remove (invoke
GC_do_blocking(suspend_self_inner) directly).
* pthread_stop_world.c (GC_brief_async_signal_safe_sleep): Decorate
with STATIC.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Wrap code into LOCK/UNLOCK (because, at least,
GC_lookup_thread should be called with the allocation lock held).
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread): Do not
ABORT if thread is unregistered in GC (just no-op instead).
* pthread_stop_world.c (GC_is_thread_suspended): Return 0 if thread is
not registered in GC.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.macros | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/README.macros b/doc/README.macros index c3d27437..90ef5128 100644 --- a/doc/README.macros +++ b/doc/README.macros @@ -403,6 +403,9 @@ PARALLEL_MARK Allows the marker to run in multiple threads. Recommended GC_ALWAYS_MULTITHREADED Force multi-threaded mode at GC initialization. (Turns GC_allow_register_threads into a no-op routine.) +GC_ENABLE_SUSPEND_THREAD (Linux only) Turn on thread suspend/resume API +support. + GC_WINMAIN_REDIRECT (Win32 only) Redirect (rename) an application WinMain to GC_WinMain; implement the "real" WinMain which starts a new thread to call GC_WinMain after initializing the GC. Useful for WinCE. |