OSA : OS_Queue_Create

OS_Queue_Create (queue, buffer, size)

Not allowed in interrupt

Create queue of pointer to messages. After creation queue 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:

Not in interrupt

Parameters:

queue Queue of messages descriptor. Variable of OST_QUEUE type.
buffer Buffer to store messages. For PIC16, buffer can be allocated only in bank0 or bank1
size Queue size. Can't be greater than buffer size.

Returns:

nothing

Example:

OST_QUEUE queue;
OST_MSG  buffer[10];
 
void Task (void)
{
    OS_Queue_Create (queue, buffer, 10);
    for (;;) {
        /*...*/
    }
}

Old style name

OS_CreateQMsg

See also