BoolE OsAnyEvents( OsEventsT events );
Function OsAnyEvents() may be called by the client application to test the events associated with the currently running task against any of a specified set of events. The function returns Bool_TRUE (non-zero) if any event is set in both the function argument and the running task's event pattern. The task's event pattern is not changed.
The example below shows part of a task that sends an event to itself after 10 time ticks (via a timer) if none of events 4, 5 nor 6 are set when the task runs.
flag = OsAnyEvents( OS_EVENT_4 | OS_EVENT_5 | OS_EVENT_6 );
if ( flag == Bool_FALSE )
{
OsNewTimer( 10, MyTask, OS_EVENT_7 );
}