[Git][ghc/ghc][wip/jsem] fix the fixes
sheaf (@sheaf)
gitlab at gitlab.haskell.org
Thu Sep 29 20:07:01 UTC 2022
sheaf pushed to branch wip/jsem at Glasgow Haskell Compiler / GHC
Commits:
5b620380 by sheaf at 2022-09-29T22:06:49+02:00
fix the fixes
- - - - -
2 changed files:
- compiler/GHC/Driver/MakeSem.hs
- hadrian/hadrian.cabal
Changes:
=====================================
compiler/GHC/Driver/MakeSem.hs
=====================================
@@ -212,10 +212,12 @@ cleanupJobserver (Jobserver { jSemaphore = sem
vcat [ text "about to release all owned semaphore tokens"
, ppr jobs ]
-- (-1) because the caller of GHC is responsible for releasing the last slot on the semaphore.
- tokens_before <- releaseSemaphore sem (owned - 1)
- logDumpMsg logger "cleanupJobserver }" $
- vcat [ text "released:" <+> ppr owned
- , text "semaphore count before release:" <+> ppr tokens_before ]
+ let toks_to_release = owned - 1
+ when (toks_to_release > 0) do
+ tokens_before <- releaseSemaphore sem toks_to_release
+ logDumpMsg logger "cleanupJobserver }" $
+ vcat [ text "released:" <+> ppr owned
+ , text "semaphore count before release:" <+> ppr tokens_before ]
-- | Dispatch the available tokens acquired from the semaphore
-- to the pending jobs in the job server.
=====================================
hadrian/hadrian.cabal
=====================================
@@ -165,12 +165,11 @@ executable hadrian
, unordered-containers >= 0.2.1 && < 0.3
, text >= 1.2 && < 3
, time
- , unix
if os(windows)
- build-depends: Win32
- else
- build-depends: unix
+ build-depends: Win32
+ else
+ build-depends: unix
ghc-options: -Wall
-Wincomplete-record-updates
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b6203809bceb7f30b601fdc3151292b76da35a0
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b6203809bceb7f30b601fdc3151292b76da35a0
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220929/0f7e5d91/attachment-0001.html>
More information about the ghc-commits
mailing list