summaryrefslogtreecommitdiff
path: root/boehm-gc/include/private
diff options
context:
space:
mode:
Diffstat (limited to 'boehm-gc/include/private')
-rw-r--r--boehm-gc/include/private/gc_priv.h5
-rw-r--r--boehm-gc/include/private/gcconfig.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/boehm-gc/include/private/gc_priv.h b/boehm-gc/include/private/gc_priv.h
index 5465c78b6e4..dac604f2a11 100644
--- a/boehm-gc/include/private/gc_priv.h
+++ b/boehm-gc/include/private/gc_priv.h
@@ -1462,6 +1462,11 @@ GC_bool GC_is_tmp_root GC_PROTO((ptr_t p));
# endif
void GC_register_dynamic_libraries GC_PROTO((void));
/* Add dynamic library data sections to the root set. */
+
+GC_bool GC_register_main_static_data GC_PROTO((void));
+ /* We need to register the main data segment. Returns */
+ /* TRUE unless this is done implicitly as part of */
+ /* dynamic library registration. */
/* Machine dependent startup routines */
ptr_t GC_get_stack_base GC_PROTO((void)); /* Cold end of stack */
diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
index f71bb9813ed..af0d2e4ec49 100644
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/include/private/gcconfig.h
@@ -1801,6 +1801,15 @@
# define CACHE_LINE_SIZE 32 /* Wild guess */
# endif
+# ifdef LINUX
+# define REGISTER_LIBRARIES_EARLY
+ /* We sometimes use dl_iterate_phdr, which may acquire an internal */
+ /* lock. This isn't safe after the world has stopped. So we must */
+ /* call GC_register_dynamic_libraries before stopping the world. */
+ /* For performance reasons, this may be beneficial on other */
+ /* platforms as well, though it should be avoided in win32. */
+# endif /* LINUX */
+
# ifndef CLEAR_DOUBLE
# define CLEAR_DOUBLE(x) \
((word*)x)[0] = 0; \