diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-05-31 08:28:00 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-05-31 10:30:34 +0300 |
commit | 97a63fdc3b6331d11f66bcfe5ed8458528939daa (patch) | |
tree | 9b6fd2c5f663bda53aaa426c6e35b26ca8f7619f /darwin_stop_world.c | |
parent | b8cb5a63e65e17c5adb9f4fcccd615200662ced8 (diff) | |
download | bdwgc-97a63fdc3b6331d11f66bcfe5ed8458528939daa.tar.gz |
Call GC_init_parallel only from GC_init
(refactoring)
* darwin_stop_world.c [!GC_NO_THREADS_DISCOVERY
&& !DARWIN_DONT_PARSE_STACK] (GC_use_threads_discovery): Call GC_init()
instead of GC_init_parallel().
* pthread_support.c (pthread_create): Likewise.
* win32_threads.c [!GC_NO_THREADS_DISCOVERY]
(GC_use_threads_discovery): Likewise.
* win32_threads.c (GC_CreateThread): Likewise.
* win32_threads.c [!CYGWIN32 && !MSWINCE && !MSWIN_XBOX1 && !NO_CRT]
(GC_beginthreadex): Likewise.
* win32_threads.c [GC_PTHREADS] (GC_pthread_create): Likewise.
* include/private/gc_priv.h [THREADS] (GC_init, GC_init_parallel): Add
comment.
* misc.c (GC_init): Replace GC_PTHREADS||GC_WIN32_THREADS with THREADS.
* misc.c [THREADS] (GC_init): Call GC_init_parallel() even if no
parallel marker support or thread-local allocations; update comment.
* pthread_support.c (parallel_initialized): Remove.
* win32_threads.c (parallel_initialized): Likewise.
* pthread_support.c (GC_init_parallel): Update comment; do not use
parallel_initialized; do not call GC_init();
* win32_threads.c (GC_init_parallel): Likewise.
* pthread_support.c [THREAD_LOCAL_ALLOC] (GC_init_parallel): Declare
and use me local variable.
* pthread_support.c [THREAD_LOCAL_ALLOC] (GC_init_parallel): Remove
assertion that the GC lock is not hold; add assertion that
GC_is_initialized is set.
* win32_threads.c [THREAD_LOCAL_ALLOC] (GC_init_parallel): Likewise.
* pthread_support.c [THREAD_LOCAL_ALLOC] (GC_register_my_thread,
GC_start_rtn_prepare_thread): Remove redundant parentheses in
GC_init_thread_local() argument.
* win32_threads.c [THREAD_LOCAL_ALLOC] (GC_register_my_thread):
Likewise.
* win32_threads.c [!GC_NO_THREADS_DISCOVERY]
(GC_use_threads_discovery): Check GC_is_initialized value instead of
parallel_initialized one.
* win32_threads.c (GC_CreateThread): Likewise.
* win32_threads.c [!CYGWIN32 && !MSWINCE && !MSWIN_XBOX1 && !NO_CRT]
(GC_beginthreadex): Likewise.
* win32_threads.c [GC_PTHREADS] (GC_pthread_create): Likewise.
* win32_threads.c [!GC_PTHREADS && !GC_NO_THREADS_DISCOVERY]
(GC_DllMain): Likewise.
* win32_threads.c [THREAD_LOCAL_ALLOC] (GC_register_my_thread_inner):
Add comment.
* win32_threads.c [!GC_ALWAYS_MULTITHREADED && !PARALLEL_MARK
&& !GC_NO_THREADS_DISCOVERY] (GC_allow_register_threads): Do not set
parallel_initialized.
* win32_threads.c (GC_init_parallel): Call set_need_to_lock() after
GC_init_thread_local().
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r-- | darwin_stop_world.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c index 2ffa25cc..7116dc46 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -127,7 +127,7 @@ GC_API void GC_CALL GC_use_threads_discovery(void) # ifndef GC_DISCOVER_TASK_THREADS GC_query_task_threads = TRUE; # endif - GC_init_parallel(); /* just to be consistent with Win32 one */ + GC_init(); # endif } |