Available Languages?:

OSA : OS_Queue_Wait

OS_Queue_Wait (queue, os_msg_type_var)

Allowed only in taskSwitches context

Wait for message from queue.

OS_ENABLE_QUEUE constant must be defined in OSAcfg.h.

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

Call allowed:

Only in task

Parameters:

queue Queue of messages descriptor. Variable of OST_QUEUE type.
os_msg_type_var Variable of OST_MSG type, where pointer to message will be placed

Returns:

nothing

Example:

OST_QUEUE queue;
 
void Task (void)
{
    OST_MSG msg;
    for (;;) {
        /*...*/
        OS_Queue_Wait (queue, msg);   // Wait for message and store it into msg
        /*...*/
    }
}

Old style name

OS_WaitQMsg

See also

 
en/osa/ref/allservices/os_queue_wait.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