summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-07-16 16:19:12 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-07-16 16:19:12 +0400
commita05920c6a86a0e2b9c7989c5b42945d89039e8a7 (patch)
treef39a1856c6d094e7edc43b83ebc8076e68c082a8 /extra
parent07676ad23c787fc5d399830308ae2a749151c627 (diff)
downloadbdwgc-a05920c6a86a0e2b9c7989c5b42945d89039e8a7.tar.gz
Allow to compile GC_inner_start_routine aside from extra/gc.c
(for proper exceptions support on Linux) * extra/gc.c: Do not include pthread_start.c if GC_PTHREAD_START_STANDALONE defined (thus pthread_start.c could go to a standalone compilation unit). * include/private/pthread_support.h (GC_INNER_PTHRSTART): New macro (defined to either empty or GC_INNER depending on GC_PTHREAD_START_STANDALONE). * include/private/pthread_support.h (GC_start_rtn_prepare_thread, GC_thread_exit_proc): Replace GC_INNER to GC_INNER_PTHRSTART. * pthread_support.c (GC_thread_exit_proc, GC_start_rtn_prepare_thread): Likewise. * pthread_start.c (GC_inner_start_routine): Define as GC_INNER_PTHRSTART; do not call GC_log_printf if GC_PTHREAD_START_STANDALONE (since the function might be visible only within extra/gc.c compilation unit). * pthread_support.c (GC_inner_start_routine): Declare as GC_INNER_PTHRSTART.
Diffstat (limited to 'extra')
-rw-r--r--extra/gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/extra/gc.c b/extra/gc.c
index 9c16d206..fa70a0a8 100644
--- a/extra/gc.c
+++ b/extra/gc.c
@@ -70,7 +70,9 @@
#include "../specific.c"
#include "../win32_threads.c"
-#include "../pthread_start.c"
+#ifndef GC_PTHREAD_START_STANDALONE
+# include "../pthread_start.c"
+#endif
/* Restore pthread calls redirection (if altered in */
/* pthread_stop_world.c, pthread_support.c or win32_threads.c). */