The os_wait function halts the current task and waits for
one or several events such as a time interval, a time-out, or a
signal from another task or interrupt. The event_sel argument
specifies the event or events to wait for and can be any combination
of the following manifest constants:
||Wait for the interval specified by
||Wait for a signal.
||Wait for a time-out specified by
Events can be logically ORed using the vertical bar character
('|'). For example, K_TMO | K_SIG, specifies that the
task waits for a time-out or for a signal.
The ticks argument specifies the number of timer ticks to
wait for an interval event (K_IVL) or a time-out event
The dummy argument is provided
for compatibility with RTX51 Full and is not used in RTX51
This function is part of the RTX51
Tiny Real-Time Operating System which is included only with the
PK51 Professional Developer's Kit.
Refer to Events
for more information about K_IVL, K_TMO, and
When K_SIG and K_IVL get combined, then the
must be used to eliminate timer delay issues.
When one of the specified events occurs, the task is put in the
READY state. When the task resumes execution, os_wait returns
the manifest constant that identifies the event which restarted the
task. Possible return values are:
isr_send_signal, isr_set_ready, os_clear_signal, os_reset_interval, os_send_signal, os_set_ready, os_wait1, os_wait2
Related Knowledgebase Articles