@@ -63,7 +63,7 @@ enqueueLIFO ::
63enqueueLIFO sv q inner m = do
63enqueueLIFO sv q inner m = do
64 atomicModifyIORefCAS_ q $ \(xs, ys) ->
64 atomicModifyIORefCAS_ q $ \(xs, ys) ->
65 if inner then (xs, m : ys) else (m : xs, ys)
65 if inner then (xs, m : ys) else (m : xs, ys)
66− ringDoorBell (needDoorBell sv) (outputDoorBell sv)
66+ ringDoorBell (doorBellOnWorkQ sv) (outputDoorBell sv)
68data QResult a = QEmpty | QOuter a | QInner a
68data QResult a = QEmpty | QOuter a | QInner a
@@ -239,7 +239,7 @@ enqueueAhead sv q m = do
239 atomicModifyIORefCAS_ q $ \ case
239 atomicModifyIORefCAS_ q $ \ case
240 ([], n) -> ([snd m], n + 1) -- increment sequence
240 ([], n) -> ([snd m], n + 1) -- increment sequence
241 _ -> error "enqueueAhead: queue is not empty"
241 _ -> error "enqueueAhead: queue is not empty"
242− ringDoorBell (needDoorBell sv) (outputDoorBell sv)
242+ ringDoorBell (doorBellOnWorkQ sv) (outputDoorBell sv)
244-- enqueue without incrementing the sequence number
244-- enqueue without incrementing the sequence number
245{-# INLINE reEnqueueAhead #-}
245{-# INLINE reEnqueueAhead #-}
@@ -249,7 +249,7 @@ reEnqueueAhead sv q m = do
249 atomicModifyIORefCAS_ q $ \ case
249 atomicModifyIORefCAS_ q $ \ case
250 ([], n) -> ([m], n) -- DO NOT increment sequence
250 ([], n) -> ([m], n) -- DO NOT increment sequence
251 _ -> error "reEnqueueAhead: queue is not empty"
251 _ -> error "reEnqueueAhead: queue is not empty"
252− ringDoorBell (needDoorBell sv) (outputDoorBell sv)
252+ ringDoorBell (doorBellOnWorkQ sv) (outputDoorBell sv)
254-- Normally the thread that has the token should never go away. The token gets
254-- Normally the thread that has the token should never go away. The token gets
255-- handed over to another thread, but someone or the other has the token at any
255-- handed over to another thread, but someone or the other has the token at any
@@ -983,7 +983,7 @@ getLifoSVar mrun cfg = do
983 then isQueueDoneAhead sv aheadQ
983 then isQueueDoneAhead sv aheadQ
984 else workDone sv
984 else workDone sv
986− , needDoorBell = wfw
986+ , doorBellOnWorkQ = wfw
987 , svarMrun = mrun
987 , svarMrun = mrun
988 , workerCount = active
988 , workerCount = active
989 -- XXX We can use delThread or modThread based on eager flag.
989 -- XXX We can use delThread or modThread based on eager flag.