From: sof Date: Sun, 18 May 1997 04:24:53 +0000 (+0000) Subject: [project @ 1997-05-18 04:24:53 by sof] X-Git-Tag: Approximately_1000_patches_recorded~667 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8a882e149a0f24136e8d1f1d6f4dd6aa245720ff;p=ghc-hetmet.git [project @ 1997-05-18 04:24:53 by sof] QSem bug fix --- diff --git a/ghc/lib/concurrent/Semaphore.lhs b/ghc/lib/concurrent/Semaphore.lhs index f3f5429..363c936 100644 --- a/ghc/lib/concurrent/Semaphore.lhs +++ b/ghc/lib/concurrent/Semaphore.lhs @@ -103,7 +103,7 @@ signalQSemN (QSemN sem) n where free avail [] = return (avail,[]) free avail ((req,block):blocked) = - if avail > req then + if avail >= req then putMVar block () >> free (avail-req) blocked else