AMX 86 Procedures
K
A
DAK
345
ajwatm ajwatm
Purpose Task Delay or Timed Wait for a Wake Request
Used by n Task o IS P o Timer Procedure o Restart Procedure n Exit Procedure
Setup long tval;
int status;
.
.
status = ajwatm(tval);
AX DX:CX
Where tval is the required wait interval or delay period measured in AMX
system ticks. Tval must be positive. If tval = 0, the caller will not
wait.
Results Interrupts are enabled.
Status is returned.
AEROK = Call successful
Task waited for entire interval
AERWBT = Task wakened before interval expired
AERTMV = Invalid interval (<0)
The caller is allowed to resume execution and its task timer is stopped as
soon as another task, ISP or Timer Procedure issues an ajwake call
specifying this task.
If a task has an outstanding wake request pending when it calls ajwatm,
the task will continue execution immediately without waiting.
If there is any possibility that some task, ISP or Timer Procedure has
already issued an ajwake call to wake this task, you should call ajwapr to
reset any pending wake request before calling ajwatm.
Note This procedure provides a simplified form of the task signal wait with
timeout (see ajsgwat).
If you want to do a task delay with no ajwake interference, use ajsgwat
with a task signal mask of 0.
See Also ajwait, ajwake, ajwapr, ajsgwat