mulithreading: fix semaphore-signal

It didn't wake up all processes to check the condition what caused n+1 lag in
condition check for signal-process (when called with n>1). Fixes #421. No
regression test, because this is already tested in sem-signal-* tests (they were
failing).
This commit is contained in:
Daniel Kochmanski 2017-12-08 13:37:52 +01:00
parent a51f28f6a5
commit 2e9c58b3d4
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ mp_semaphore_wait_count(cl_object semaphore)
}
AO_fetch_and_add((AO_t*)&semaphore->semaphore.counter, n);
if (semaphore->semaphore.queue_list != ECL_NIL) {
ecl_wakeup_waiters(env, semaphore, ECL_WAKEUP_ONE);
ecl_wakeup_waiters(env, semaphore, ECL_WAKEUP_ALL);
}
@(return);
} @)

View file

@ -26,7 +26,7 @@
(suite 'make-check
'(executable ieee-fp eprocess package-ext hash-tables ansi+ mixed cmp emb
ffi mop run-program))
ffi mop run-program mp ieee-fp))
(defmacro is-true (form)