Keil Logo

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
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.