OSA : OS_Msg_Check

bool OS_Msg_Check (msg_cb)
bool OS_Msg_Check_I (msg_cb)

Check if msg_cb exists.

Call allowed:

Everywhere

Parameters:

msg_cb Pointer to message descriptor. Variable of OST_MSG_CB type

Returns:

false message does not exist
true message exists

Example:

OST_MSG_CB msg_cb;
 
void Task (void)
{
    OST_MSG msg;
    for (;;) {
        /*...*/
        if (OS_Msg_Check (msg_cb)) {     // If message exists
            OS_Msg_Accept(msg_cb, msg);  // then accept it.
            /*...*/
        };
        /*...*/
    }
}

Old style name

OS_CheckMsg

See also