OSA : OS_Smsg_Wait

OS_Smsg_Wait (smsg, os_smsg_type_var)

Allowed only in taskSwitches context

Wait for simple message.

Call allowed:

Only in task

Parameters:

smsg Simple message descriptor. Variable of OST_SMSG type
os_smsg_type_var Variable of OST_SMSG type, where simple message will be placed

Returns:

nothing

Example:

OST_SMSG smsg;
 
void Task (void)
{
    OST_SMSG mysmsg;
    for (;;) {
        /*...*/
        OS_Smsg_Wait(smsg, mysmsg);  // Wait for simple message and store it
                                     // into mysmsg
        /*...*/
    }
}

Old style name

OS_WaitSMsg

See also