OSA : OS_Smsg_Check

bool OS_Smsg_Check (smsg)
bool OS_Smsg_Check_I (smsg)

Check if simple message smsg is present.

Call allowed:

Everywhere

Parameters:

smsg Simple message descriptor. Variable of OST_SMSG type

Returns:

false smsg absent (zero)
true smsg present (non-zero)

Example:

OST_SMSG smsg;
 
void Task (void)
{
    OST_SMSG SM;
    for (;;) {
        /*...*/
        if (OS_Smsg_Check (smsg)) {     // If smsg present
            OS_Smsg_Accept(smsg, SM);   // Accept it and store in SM variable
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_CheckSMsg

See also