Command disabled: backlink
 
Available Languages?:

OSA : OS_Queue_IsEmpty

bool OS_Queue_IsEmpty (queue)
bool OS_Queue_IsEmpty_I (queue)

Check if queue of messages is empty.

OS_ENABLE_QUEUE constant must be defined in OSAcfg.h.

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

Call allowed:

Everywhere

Parameters:

queue Queue of messages descriptor. Variable of OST_QUEUE type.

Returns:

false there are some messages in the queue
true queue is free, no messages

Example:

OST_QUEUE queue;
 
void Task (void)
{
    for (;;) {
        /*...*/
        if (OS_Queue_IsEmpty (queue)) {
            /* The queue is empty */
        } else {
            /* The queue has messages */
        };
        /*...*/
    }
}

Old style name

See also

 
en/osa/ref/allservices/os_queue_isempty.txt · Last modified: 07.10.2010 13:57 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki