[project @ 2003-12-15 16:23:54 by simonmar] Fix a deadlock: an OS thread returning from a C call could enter grabReturnCapability, grabbing the capability that was in the process of being passed to another thread via passCapability.  This leads to a deadlock shortly afterward, because the passCapability flag is still set, so a normal worker won't pick up the capability when it is released.
[project @ 2003-12-15 16:23:54 by simonmar]
Fix a deadlock: an OS thread returning from a C call could enter
grabReturnCapability, grabbing the capability that was in the process
of being passed to another thread via passCapability.  This leads to a
deadlock shortly afterward, because the passCapability flag is still
set, so a normal worker won't pick up the capability when it is
released.

Fix (not sure if this is the best fix, though): don't grab the
capability in grabReturnCapability() if passCapabilty is set.

ilyasergey/GHC-XAppFix,green-haskell/ghc,elieux/ghc,shlevy/ghc,lukexi/ghc-7.8-arm64,nushio3/ghc,sgillespie/ghc,lukexi/ghc-7.8-arm64,mfine/ghc,ghc-android/ghc,fmthoma/ghc,sgillespie/ghc,wxwxwwxxx/ghc,lukexi/ghc-7.8-arm64,acowley/ghc,siddhanathan/ghc,elieux/ghc,mcschroeder/ghc,acowley/ghc,holzensp/ghc,forked-upstream-packages-for-ghcjs/ghc,mfine/ghc,AlexanderPankiv/ghc,olsner/ghc,vTurbine/ghc,snoyberg/ghc,AlexanderPankiv/ghc,mcmaniac/ghc,frantisekfarka/ghc-dsi,mcmaniac/ghc,wxwxwwxxx/ghc,mettekou/ghc,oldmanmike/ghc,snoyberg/ghc,nushio3/ghc,fmthoma/ghc,GaloisInc/halvm-ghc,nomeata/ghc,ezyang/ghc,AlexanderPankiv/ghc,gridaphobe/ghc,siddhanathan/ghc,shlevy/ghc,gcampax/ghc,lukexi/ghc-7.8-arm64,gcampax/ghc,gcampax/ghc,nathyong/microghc-ghc,da-x/ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,gridaphobe/ghc,spacekitteh/smcghc,sgillespie/ghc,da-x/ghc,mcschroeder/ghc,olsner/ghc,mettekou/ghc,wxwxwwxxx/ghc,mettekou/ghc,oldmanmike/ghc,da-x/ghc,ekmett/ghc,GaloisInc/halvm-ghc,mcmaniac/ghc,green-haskell/ghc,fmthoma/ghc,spacekitteh/smcghc,tibbe/ghc,frantisekfarka/ghc-dsi,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,vTurbine/ghc,gridaphobe/ghc,hferreiro/replay,fmthoma/ghc,urbanslug/ghc,spacekitteh/smcghc,acowley/ghc,forked-upstream-packages-for-ghcjs/ghc,green-haskell/ghc,jstolarek/ghc,ezyang/ghc,mettekou/ghc,lukexi/ghc,anton-dessiatov/ghc,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,vTurbine/ghc,sdiehl/ghc,ryantm/ghc,wxwxwwxxx/ghc,sgillespie/ghc,vTurbine/ghc,ml9951/ghc,holzensp/ghc,jstolarek/ghc,urbanslug/ghc,nkaretnikov/ghc,nathyong/microghc-ghc,gcampax/ghc,frantisekfarka/ghc-dsi,GaloisInc/halvm-ghc,sdiehl/ghc,da-x/ghc,mcschroeder/ghc,gridaphobe/ghc,ryantm/ghc,ilyasergey/GHC-XAppFix,green-haskell/ghc,siddhanathan/ghc,christiaanb/ghc,hferreiro/replay,urbanslug/ghc,elieux/ghc,mfine/ghc,mfine/ghc,lukexi/ghc-7.8-arm64,GaloisInc/halvm-ghc,christiaanb/ghc,TomMD/ghc,nushio3/ghc,ghc-android/ghc,TomMD/ghc,nathyong/microghc-ghc,ezyang/ghc,nomeata/ghc,GaloisInc/halvm-ghc,hferreiro/replay,nathyong/microghc-ghc,tibbe/ghc,olsner/ghc,ezyang/ghc,ekmett/ghc,nushio3/ghc,lukexi/ghc,tjakway/ghcjvm,ezyang/ghc,gcampax/ghc,christiaanb/ghc,tibbe/ghc,nkaretnikov/ghc,ml9951/ghc,elieux/ghc,holzensp/ghc,ilyasergey/GHC-XAppFix,vikraman/ghc,anton-dessiatov/ghc,nathyong/microghc-ghc,fmthoma/ghc,tibbe/ghc,vikraman/ghc,elieux/ghc,sdiehl/ghc,oldmanmike/ghc,tjakway/ghcjvm,lukexi/ghc,shlevy/ghc,shlevy/ghc,siddhanathan/ghc,oldmanmike/ghc,forked-upstream-packages-for-ghcjs/ghc,sdiehl/ghc,fmthoma/ghc,vikraman/ghc,bitemyapp/ghc,ghc-android/ghc,TomMD/ghc,vikraman/ghc,christiaanb/ghc,ryantm/ghc,ilyasergey/GHC-XAppFix,sdiehl/ghc,wxwxwwxxx/ghc,TomMD/ghc,mfine/ghc,snoyberg/ghc,fmthoma/ghc,nushio3/ghc,ml9951/ghc,sgillespie/ghc,TomMD/ghc,AlexanderPankiv/ghc,christiaanb/ghc,shlevy/ghc,olsner/ghc,acowley/ghc,hferreiro/replay,nomeata/ghc,tjakway/ghcjvm,nomeata/ghc,oldmanmike/ghc,nkaretnikov/ghc,olsner/ghc,ekmett/ghc,anton-dessiatov/ghc,holzensp/ghc,snoyberg/ghc,vikraman/ghc,siddhanathan/ghc,ml9951/ghc,sgillespie/ghc,olsner/ghc,mettekou/ghc,siddhanathan/ghc,hferreiro/replay,urbanslug/ghc,gridaphobe/ghc,hferreiro/replay,mcmaniac/ghc,wxwxwwxxx/ghc,gcampax/ghc,olsner/ghc,bitemyapp/ghc,christiaanb/ghc,ghc-android/ghc,nkaretnikov/ghc,mcschroeder/ghc,ml9951/ghc,da-x/ghc,TomMD/ghc,jstolarek/ghc,nkaretnikov/ghc,mfine/ghc,anton-dessiatov/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,TomMD/ghc,shlevy/ghc,tjakway/ghcjvm,snoyberg/ghc,anton-dessiatov/ghc,ghc-android/ghc,spacekitteh/smcghc,mcmaniac/ghc,oldmanmike/ghc,wxwxwwxxx/ghc,frantisekfarka/ghc-dsi,mettekou/ghc,ezyang/ghc,green-haskell/ghc,sdiehl/ghc,spacekitteh/smcghc,shlevy/ghc,mfine/ghc,elieux/ghc,christiaanb/ghc,ezyang/ghc,ekmett/ghc,AlexanderPankiv/ghc,mcschroeder/ghc,ryantm/ghc,nathyong/microghc-ghc,holzensp/ghc,ekmett/ghc,bitemyapp/ghc,acowley/ghc,snoyberg/ghc,ml9951/ghc,acowley/ghc,hferreiro/replay,oldmanmike/ghc,nkaretnikov/ghc,nomeata/ghc,mcschroeder/ghc,nkaretnikov/ghc,jstolarek/ghc,GaloisInc/halvm-ghc,ryantm/ghc,AlexanderPankiv/ghc,forked-upstream-packages-for-ghcjs/ghc,nathyong/microghc-ghc,urbanslug/ghc,ghc-android/ghc,ghc-android/ghc,bitemyapp/ghc,vikraman/ghc,sdiehl/ghc,anton-dessiatov/ghc,acowley/ghc,nushio3/ghc,tibbe/ghc,elieux/ghc,urbanslug/ghc,lukexi/ghc,ml9951/ghc,tjakway/ghcjvm,bitemyapp/ghc,sgillespie/ghc,da-x/ghc,gridaphobe/ghc,mcschroeder/ghc,nushio3/ghc,anton-dessiatov/ghc,snoyberg/ghc,vTurbine/ghc,jstolarek/ghc,vTurbine/ghc,vikraman/ghc,lukexi/ghc,gcampax/ghc,frantisekfarka/ghc-dsi,siddhanathan/ghc,gridaphobe/ghc,ml9951/ghc,mettekou/ghc,vTurbine/ghc,da-x/ghc