From 2bfc6d6791274e8f170e8972c899dcb66e8881c1 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 7 Dec 2011 20:05:39 +0100 Subject: Fix cleanup of elements in lock-free queues --- erts/emulator/beam/erl_async.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'erts/emulator/beam/erl_async.c') diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c index 2dc7237f7c..8bca9ae582 100644 --- a/erts/emulator/beam/erl_async.c +++ b/erts/emulator/beam/erl_async.c @@ -304,8 +304,9 @@ static ERTS_INLINE ErtsAsync *async_get(ErtsThrQ_t *q, switch (erts_thr_q_inspect(q, 1)) { case ERTS_THR_Q_DIRTY: break; + case ERTS_THR_Q_NEED_THR_PRGR: #ifdef ERTS_SMP - case ERTS_THR_Q_NEED_THR_PRGR: { + { ErtsThrPrgrVal prgr = erts_thr_q_need_thr_progress(q); erts_thr_progress_wakeup(NULL, prgr); /* @@ -522,8 +523,8 @@ int erts_async_ready_clean(void *varq, void *val) switch (cstate) { case ERTS_THR_Q_DIRTY: return ERTS_ASYNC_READY_DIRTY; -#ifdef ERTS_SMP case ERTS_THR_Q_NEED_THR_PRGR: +#ifdef ERTS_SMP *((ErtsThrPrgrVal *) val) = erts_thr_q_need_thr_progress(&arq->thr_q); return ERTS_ASYNC_READY_NEED_THR_PRGR; -- cgit v1.2.3