OSA : OS_Bsem_Wait

OS_Bsem_Wait (bsem)

Allowed only in taskSwitches context

Wait for binary semaphore.

Call allowed:

Only in task

Parameters:

bsem Binary semaphore's ID. Number of binary semaphores is set by OS_BSEMS constant in OSAcfg.h

Returns:

nothing

Example:

void Task (void)
{
    for (;;) {
        /*...*/
        OS_Bsem_Wait(5);   // Wait for binary semaphore #5
        /*...*/
    }
}

Old style name

OS_WaitBSem

See also