This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX51-Tiny: os_wait2(..) return question

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 ???
}

Parents
  • I suppose its not possible for both of them to occur at precisely the same time, but it is certainly possible for both of them to occur before RTX returns control back to the task. Thus the original question: which event, if any, takes priority with respect to the return value from the wait function?

Reply
  • I suppose its not possible for both of them to occur at precisely the same time, but it is certainly possible for both of them to occur before RTX returns control back to the task. Thus the original question: which event, if any, takes priority with respect to the return value from the wait function?

Children