Download OS-9 Technical User Manual

Transcript
Appendix C
User-state System Calls
Ev$Wait
Wait for Event to Occur
Input
d0.l
d1.w
d2.l
d3.l
=
=
=
=
event ID number
4 (Ev$Wait function code)
minimum activation value (signed)
maximum activation value (signed)
Output
d1.l = actual event value
Error Output
cc = carry bit set
d1.w = error code if error
Function
Ev$Wait waits
for an event to occur. The event variable is compared to the
range specified in d2 and d3. If the value is not in range, the calling
process is suspended in a FIFO event queue. It waits until an Ev$Signl
occurs that puts the value in range and adds the wait auto-increment
(specified at creation) to the event variable.
If the process receives a signal while in the event queue, it is activated
even though the event has not actually occurred. The auto-increment is not
added to the event variable, and the event value returned is not within the
specified range. The caller’s intercept routine is executed, but an event
error is not returned.
Possible Errors
E$EvntID
ID specified is not a valid active event.
C-29