From 8a882e149a0f24136e8d1f1d6f4dd6aa245720ff Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 18 May 1997 04:24:53 +0000 Subject: [PATCH] [project @ 1997-05-18 04:24:53 by sof] QSem bug fix --- ghc/lib/concurrent/Semaphore.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 1.7.10.4