OSA : OS_Squeue_IsFull

bool OS_Squeue_IsFull (squeue)
bool OS_Squeue_IsFull_I (squeue)

Check if queue of simple messages is full.

OS_ENABLE_SQUEUE constant must be defined in OSAcfg.h.

For PIC16, message queues can be allocated only in bank0 or bank1

Call allowed:

Everywhere

Parameters:

squeue Queue of simple messages descriptor. Variable of OST_SQUEUE type.

Returns:

false there is free room to add new message
true queue is full

Example:

OST_SQUEUE squeue;
 
void Task (void)
{
    for (;;) {
        /*...*/
        if (!OS_Squeue_IsFull (squeue)) {       // If there is a room
            OS_Squeue_Send_Now(squeue, 'A');    // then send simple message 'A'
        };
        /*...*/
    }
}

Old style name

OS_IsQSMsgFull

See also