[Git][ghc/ghc][wip/jsem] fix the fixes
sheaf (@sheaf)
gitlab at gitlab.haskell.org
Thu Sep 29 20:06:33 UTC 2022
sheaf pushed to branch wip/jsem at Glasgow Haskell Compiler / GHC
Commits:
4ef26c78 by sheaf at 2022-09-29T22:06:20+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 (owned - 1)
+ 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/4ef26c78b511fe576f75a1d37e7f898d99b756c6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ef26c78b511fe576f75a1d37e7f898d99b756c6
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/20ca9834/attachment-0001.html>
More information about the ghc-commits
mailing list