Entry | |
---|---|
R0 | Poll Mask |
R1 | Pointer to 256 byte block |
R2 | Earliest monotonic time for return with null reason |
R3 | Pointer to pollword in RMA (if R0 bit22 is set) |
Exit | |
---|---|
R0 | Reason Code |
R1 | Pointer to block of data |
R2 | Senders task handle |
The purpose of this call is poll the Wimp to check for any system wide events that the application may need to respond to, but will return control to this task as soon as possible after the time stated in R2.
This call effectively carries out the same function as Wimp_Poll, except that any Null reason codes that occur prior to the time given in R2 will not be delivered to the task. Delivery of other events is not affected.
This provides tasks which want to perform actions at scheduled times an efficient way to sleep until the next action is due to occur (at which point the Wimp will ‘wake up’ the task by delivering the null poll event). Note however that there is no guarantee that your task will regain control at precisely the time you specify. E.g. the system could be busy servicing another task, or a single-tasking program could have started.
If upon calling Wimp_PollIdle an escape condition is detected, the Wimp will cancel the condition and disable future escape conditions.
Any errors that occur inside Wimp_PollIdle are reported by the Wimp itself and not passed back to the applications. The only exception to this rule is when an error was caused due to bad parameter usage.