Set tso->why_blocked before calling maybePerformBlockedException(), so
that throwToSingleThreaded() doesn't try to unblock the current thread
(it is already unblocked).
goto done;
#endif
- case BlockedOnCCall_Interruptible:
- case BlockedOnCCall:
- // ccall shouldn't be put on the run queue, because whenever
- // we raise an exception for such a blocked thread, it's only
- // when we're /exiting/ the call.
- tso->why_blocked = NotBlocked;
- return;
-
default:
barf("removeFromQueues: %d", tso->why_blocked);
}
traceEventRunThread(cap, tso);
+ /* Reset blocking status */
+ tso->why_blocked = NotBlocked;
+
if ((tso->flags & TSO_BLOCKEX) == 0) {
// avoid locking the TSO if we don't have to
if (tso->blocked_exceptions != END_BLOCKED_EXCEPTIONS_QUEUE) {
}
}
- /* Reset blocking status */
- tso->why_blocked = NotBlocked;
-
cap->r.rCurrentTSO = tso;
cap->in_haskell = rtsTrue;
errno = saved_errno;