mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-12-29 16:44:10 +03:00
Record the result in IsCurrentThreadBound
This commit is contained in:
parent
a3954f3179
commit
ade267c166
@ -196,7 +196,7 @@ stepThread sched memtype tid action ctx = case action of
|
||||
-- check if the current thread is bound
|
||||
AIsBound c ->
|
||||
let isBound = isJust (_bound =<< M.lookup tid (cThreads ctx))
|
||||
in simple (goto (c isBound) tid (cThreads ctx)) IsCurrentThreadBound
|
||||
in simple (goto (c isBound) tid (cThreads ctx)) (IsCurrentThreadBound isBound)
|
||||
|
||||
-- get the 'ThreadId' of the current thread
|
||||
AMyTId c -> simple (goto (c tid) tid (cThreads ctx)) MyThreadId
|
||||
|
@ -127,7 +127,7 @@ tvarsRead act = S.fromList $ case act of
|
||||
rewind :: ThreadAction -> Maybe Lookahead
|
||||
rewind (Fork _) = Just WillFork
|
||||
rewind (ForkOS _) = Just WillForkOS
|
||||
rewind IsCurrentThreadBound = Just WillIsCurrentThreadBound
|
||||
rewind (IsCurrentThreadBound _) = Just WillIsCurrentThreadBound
|
||||
rewind MyThreadId = Just WillMyThreadId
|
||||
rewind (GetNumCapabilities _) = Just WillGetNumCapabilities
|
||||
rewind (SetNumCapabilities i) = Just (WillSetNumCapabilities i)
|
||||
|
@ -91,7 +91,7 @@ data ThreadAction =
|
||||
-- ^ Start a new thread.
|
||||
| ForkOS ThreadId
|
||||
-- ^ Start a new bound thread.
|
||||
| IsCurrentThreadBound
|
||||
| IsCurrentThreadBound Bool
|
||||
-- ^ Check if the current thread is bound.
|
||||
| MyThreadId
|
||||
-- ^ Get the 'ThreadId' of the current thread.
|
||||
|
Loading…
Reference in New Issue
Block a user