#include "libguile/_scm.h"
#include "libguile/bytevectors.h"
#include "libguile/instructions.h"
+#include "libguile/threads.h"
#include "libguile/foreign.h"
\f
static SCM pointer_weak_refs = SCM_BOOL_F;
+static scm_i_pthread_mutex_t weak_refs_lock = SCM_I_PTHREAD_MUTEX_INITIALIZER;
+
static void
register_weak_reference (SCM from, SCM to)
{
+ scm_i_pthread_mutex_lock (&weak_refs_lock);
scm_hashq_set_x (pointer_weak_refs, from, to);
+ scm_i_pthread_mutex_unlock (&weak_refs_lock);
}
static void