summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-10-06 07:41:37 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-10-06 15:23:14 +0300
commitbae5b7355f1cb1eef34a59f96991cc0b011d6584 (patch)
tree3d820767cc555a22c15e42fb3b94e77d34739b68 /win32_threads.c
parent73bd122b9fe44f94b9f85652ecfb5644d6020590 (diff)
downloadbdwgc-bae5b7355f1cb1eef34a59f96991cc0b011d6584.tar.gz
Move GC_NO_THREADS_DISCOVERY definition to gcconfig.h
(refactoring) * darwin_stop_world.c (GC_use_threads_discovery): Do not check DARWIN_DONT_PARSE_STACK. * include/private/gcconfig.h [!GC_NO_THREADS_DISCOVERY] (GC_NO_THREADS_DISCOVERY): Define macro (where the mode is unsupported); move comment from win32_threads.c. * include/private/gcconfig.h [GC_DISCOVER_TASK_THREADS && GC_NO_THREADS_DISCOVERY && !CPPCHECK]: Issue error. * win32_threads.c: Replace ((GC_DLL||GC_INSIDE_DLL) && !NO_CRT && !GC_NO_THREADS_DISCOVERY && !MSWINCE && !THREAD_LOCAL_ALLOC && !GC_PTHREADS) with !GC_NO_THREADS_DISCOVERY.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/win32_threads.c b/win32_threads.c
index dd523b19..153dd7b6 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -89,12 +89,7 @@ static ptr_t copy_ptr_regs(word *regs, const CONTEXT *pcontext);
# define PUSHED_REGS_COUNT 29
#endif
-/* DllMain-based thread registration is currently incompatible */
-/* with thread-local allocation, pthreads and WinCE. */
-#if (defined(GC_DLL) || defined(GC_INSIDE_DLL)) && !defined(NO_CRT) \
- && !defined(GC_NO_THREADS_DISCOVERY) && !defined(MSWINCE) \
- && !defined(THREAD_LOCAL_ALLOC) && !defined(GC_PTHREADS)
-
+#ifndef GC_NO_THREADS_DISCOVERY
/* This code operates in two distinct modes, depending on */
/* the setting of GC_win32_dll_threads. */
/* If GC_win32_dll_threads is set, all threads in the process */
@@ -133,9 +128,6 @@ static ptr_t copy_ptr_regs(word *regs, const CONTEXT *pcontext);
/* the basic collector rely on such facilities, but an */
/* optional package that intercepts thread calls this way */
/* would probably be nice. */
-# ifndef GC_NO_THREADS_DISCOVERY
-# define GC_NO_THREADS_DISCOVERY
-# endif
# define GC_win32_dll_threads FALSE
# undef MAX_THREADS
# define MAX_THREADS 1 /* dll_thread_table[] is always empty. */