mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-04 08:40:21 +02:00
add atfork interface
* libguile/posix.h: * libguile/posix.c (scm_c_atfork): New interface. (scm_fork): Wrap fork calls in atfork pre/post invocations, and finally a GC_call_with_alloc_lock. It's an attempt to grab the interesting mutexes in Guile. * libguile/weak-set.c (make_weak_set): * libguile/weak-table.c (make_weak_table): Use atfork mechanism to lock and unlock weak sets and weak tables during a fork(), in such a way that does not prevent those tables from being gc'd.
This commit is contained in:
parent
981bace7e4
commit
9f6ac5d71d
6 changed files with 253 additions and 31 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue