projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fef4deb
)
Fix two more locking issues in throwTo()
author
Bertram Felgenhauer
<int-e@gmx.de>
Wed, 7 Jan 2009 12:08:08 +0000
(12:08 +0000)
committer
Bertram Felgenhauer
<int-e@gmx.de>
Wed, 7 Jan 2009 12:08:08 +0000
(12:08 +0000)
rts/RaiseAsync.c
patch
|
blob
|
history
diff --git
a/rts/RaiseAsync.c
b/rts/RaiseAsync.c
index
10c9b7c
..
1a57e47
100644
(file)
--- a/
rts/RaiseAsync.c
+++ b/
rts/RaiseAsync.c
@@
-415,6
+415,7
@@
check_target:
// Unblocking BlockedOnSTM threads requires the TSO to be
// locked; see STM.c:unpark_tso().
if (target->why_blocked != BlockedOnSTM) {
// Unblocking BlockedOnSTM threads requires the TSO to be
// locked; see STM.c:unpark_tso().
if (target->why_blocked != BlockedOnSTM) {
+ unlockTSO(target);
goto retry;
}
if ((target->flags & TSO_BLOCKEX) &&
goto retry;
}
if ((target->flags & TSO_BLOCKEX) &&
@@
-436,6
+437,11
@@
check_target:
// thread is blocking exceptions, and block on its
// blocked_exception queue.
lockTSO(target);
// thread is blocking exceptions, and block on its
// blocked_exception queue.
lockTSO(target);
+ if (target->why_blocked != BlockedOnCCall &&
+ target->why_blocked != BlockedOnCCall_NoUnblockExc) {
+ unlockTSO(target);
+ goto retry;
+ }
blockedThrowTo(cap,source,target);
*out = target;
return THROWTO_BLOCKED;
blockedThrowTo(cap,source,target);
*out = target;
return THROWTO_BLOCKED;