diff options
author | Andy Wingo <wingo@pobox.com> | 2012-02-17 11:47:52 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-02-17 12:09:28 +0100 |
commit | f609480611cfd1585409fd6b1b90beb730b026cf (patch) | |
tree | ae054e365a2980bf9836447ba4cd9bf6c0f88e72 /libguile/init.c | |
parent | 58565208bdfe7544f7e4da8762e4c331171f9876 (diff) | |
download | guile-f609480611cfd1585409fd6b1b90beb730b026cf.tar.gz |
with a threaded guile, lock weak sets and tables during a fork
* libguile/weak-set.c (make_weak_set):
* libguile/weak-table.c (make_weak_table): If we have a threaded Guile,
* keep a weak set (table) of weak sets (tables). Use this and the
pthread_atfork mechanism to lock and unlock weak sets and weak tables
during a fork().
* libguile/weak-set.h (scm_weak_set_prehistory): New internal API.
* libguile/init.c: Add call to scm_weak_set_prehistory().
Diffstat (limited to 'libguile/init.c')
-rw-r--r-- | libguile/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/init.c b/libguile/init.c index 3509ba315..35fbedb8b 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -383,6 +383,7 @@ scm_i_init_guile (void *base) scm_storage_prehistory (); scm_threads_prehistory (base); /* requires storage_prehistory */ + scm_weak_set_prehistory (); /* requires storage_prehistory */ scm_weak_table_prehistory (); /* requires storage_prehistory */ #ifdef GUILE_DEBUG_MALLOC scm_debug_malloc_prehistory (); |