Entry | |
---|---|
R0 | 6 |
R1 | Pointer to poll word (in a global memory area, eg the RMA) |
Exit | |
---|---|
R0 | 0 if UpCall claimed |
R1 | Preserved? |
The purpose of this call is to inform the TaskWindow module that a task wants to sleep until some termination condition is met.
This call is made by a task that wants to sleep until some termination condition is met, signalled by the contents of the poll word becoming non-zero. It is not available in RISC OS 2.
The poll word must be in non-paged memory (e.g. the RMA or another dynamic area), and must be readable from user mode (TaskWindow 0.65+ will read it from user mode).
Control may return to the task before the poll word becomes non-zero. While the task is sleeping, other tasks will continue to be polled by the Wimp.
If the termination condition can be recognised externally (i.e. in another Wimp task or under interrupt) hence causing the poll word to be set non-zero, the calling task should set the poll word to zero on entry. Otherwise, the poll word must be non-zero on entry, so that the control will return to the calling task after each Wimp_Poll.
A task must not use this UpCall if it’s not re-entrant.
The calling task must be running in a task window. The task window module intercepts this UpCall; you should not do so yourself. These two restrictions may be removed in future versions of RISC OS.