taltwt
taltwt
timer alt wait
Code: 25 FI
Description: Wait until one of the enabled guards of a timer alternative is ready and
initialize pw.Temp for use during the disabling sequence. If the alternative has no
ready guard but may become ready due to a timer, place the process onto the timer
list.
Definition:
if (word[Wptr @ pw.State] = Ready.p)
word′[Wptr @ pw.Time] ← ClockReg[Priority]
else if (word[Wptr @ pw.Tlink] = TimeNotSet.p)
{
word′[Wptr @ pw.State] ← Waiting.p
deschedule process and wait for one of the guards to become ready
}
else if (word[Wptr @ pw.Tlink] = TimeSet.p)
{
if (ClockReg[Priority] after word[Wptr @ pw.Time]
{
word′[Wptr @ pw.State] ← Ready.p
word′[Wptr @ pw.Time] ← ClockReg[Priority]
}
else
{
word′[Wptr @ pw.Time] ← (word[Wptr @ pw.Time] + 1)
insert this process into timer list with alarm time (word[Wptr @ pw.Time] + 1)
if (no guards ready)
{
word′[Wptr @ pw.State] ← Waiting.p
deschedule process and wait for one of the guards to become ready
}
}
}
else
Undefined effect
word′[Wptr @ pw.Temp] ← NoneSelected.o
Areg′
Breg′
Creg′
← undefined
← undefined
← undefined
Error signals: none
186/212
®