From 1f21b4688ac243cc919a2b8fdcd7ac4ef8a47ed2 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 24 Dec 2015 02:20:18 -0500 Subject: [PATCH] WIP --- gc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gc.c b/gc.c index e7873a96..2f35151c 100644 --- a/gc.c +++ b/gc.c @@ -1172,7 +1172,14 @@ printf("DEBUG - is mutator still blocked?\n"); // Check again, if thread is still blocked we need to cooperate if (ATOMIC_SET_IF_EQ(&(m->thread_state), CYC_THREAD_STATE_BLOCKED, - CYC_THREAD_STATE_BLOCKED_COOPERATING)) { + CYC_THREAD_STATE_BLOCKED_COOPERATING) +// TODO: seems to work OK for first collection, but then gc is blocked +// again. tried this but there must be another issue... +// || +// ATOMIC_SET_IF_EQ(&(m->thread_state), +// CYC_THREAD_STATE_BLOCKED_COOPERATING, +// CYC_THREAD_STATE_BLOCKED_COOPERATING) + ) { printf("DEBUG - update mutator GC status\n"); ATOMIC_SET_IF_EQ(&(m->gc_status), statusm, statusc); pthread_mutex_lock(&(m->lock));