If I call os_wait2(..) as listed in the example below, and if subsequently another task signals MyTask() AND it times out, what will the return value be? The manual states the return value will be a manifest constant identifying the event that restarted the task, but its not clear whether this is only one of the constants or can be a combination thereof.
void MyTask( void ) _task_ 0 { ret_val = os_wait2( K_SIG | K_TMO, 25 ); // what will ret_val be if the task both // timed out AND was signaled ??? }
See at http://www.keil.com/support/man/docs/tr51/tr51_os_wait.htm The os_wait return value may be or-ed with all of posible return values at once. You must bit-check all possible events from the return value.
That states that the "event_sel" input parameter may be ORed, but it says nothing about the reply being an ORed combination of more than one value.