Keil™, An ARM® Company

Technical Support

RTX51 TINY: WILL OS_WAIT (K_SIG + K_TMO...) WORK?


Information in this article applies to:

  • C51 Version 5.x
  • RTX51 Tiny Version 1.06

QUESTION

Does the os_wait function in RTX51 Tiny allow for the combination of signals and timeouts? In other words, can I wait for a signal and a timeout with a single call to os_wait?

ANSWER

Yes. For example:

os_wait (K_TMO + K_SIG, 50, 0);

waits for a signal or 50 ticks, whichever comes first.

The return value from os_wait specifies what caused the function to return.

  • SIG_EVENT: Indicates that a SIGNAL caused os_wait to return.
  • TMO_EVENT: Indicates that a TIMEOUT or INTERVAL caused os_wait to return.
  • NOT_OK: Indicates that the value for the event argument is invalid.

MORE INFORMATION

  • Refer to os_wait in the RTX51 Tiny User's Guide.

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure