diff options
author | Andy Wingo <wingo@pobox.com> | 2013-11-28 16:20:42 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-11-28 16:20:42 +0100 |
commit | 8f0ecae98c7bef8b927287b38d12360296c236a4 (patch) | |
tree | f671973dba4daf2e5b2c40fd52d9f670b728c68b | |
parent | d364a8971828e38e8f9112b711066f4962bb400e (diff) |
Critical sections in guardians do not need to block asyncs
* libguile/guardians.c: Critical sections here cannot cause an
async_tick, so they do not need to block asyncs.
-rw-r--r-- | libguile/guardians.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libguile/guardians.c b/libguile/guardians.c index 2bf07a8ae..d6cfb2fea 100644 --- a/libguile/guardians.c +++ b/libguile/guardians.c @@ -50,7 +50,6 @@ #endif #include "libguile/_scm.h" -#include "libguile/async.h" #include "libguile/ports.h" #include "libguile/print.h" #include "libguile/smob.h" @@ -145,7 +144,7 @@ finalize_guarded (void *ptr, void *finalizer_data) g = GUARDIAN_DATA (SCM_CAR (guardian_list)); - scm_i_pthread_mutex_lock_block_asyncs (&g->mutex); + scm_i_pthread_mutex_lock (&g->mutex); if (g->live == 0) abort (); @@ -161,7 +160,7 @@ finalize_guarded (void *ptr, void *finalizer_data) g->live--; - scm_i_pthread_mutex_unlock_unblock_asyncs (&g->mutex); + scm_i_pthread_mutex_unlock (&g->mutex); } if (scm_is_true (proxied_finalizer)) @@ -212,7 +211,7 @@ scm_i_guard (SCM guardian, SCM obj) void *prev_data; SCM guardians_for_obj, finalizer_data; - scm_i_pthread_mutex_lock_block_asyncs (&g->mutex); + scm_i_pthread_mutex_lock (&g->mutex); g->live++; @@ -256,7 +255,7 @@ scm_i_guard (SCM guardian, SCM obj) SCM_SETCAR (finalizer_data, proxied_finalizer); } - scm_i_pthread_mutex_unlock_unblock_asyncs (&g->mutex); + scm_i_pthread_mutex_unlock (&g->mutex); } } @@ -266,7 +265,7 @@ scm_i_get_one_zombie (SCM guardian) t_guardian *g = GUARDIAN_DATA (guardian); SCM res = SCM_BOOL_F; - scm_i_pthread_mutex_lock_block_asyncs (&g->mutex); + scm_i_pthread_mutex_lock (&g->mutex); if (!scm_is_null (g->zombies)) { @@ -275,7 +274,7 @@ scm_i_get_one_zombie (SCM guardian) g->zombies = SCM_CDR (g->zombies); } - scm_i_pthread_mutex_unlock_unblock_asyncs (&g->mutex); + scm_i_pthread_mutex_unlock (&g->mutex); return res; } |