HANDLE osOpenQueue( SYSNAME Name );
The name of the queue object to open.
The return value is a handle to the opened queue object upon success, or NULL_HANDLE on failure. Call the osGetLastError function to obtain extended error information.
This function opens an existing queue object by its name.
The queue is implemented as a FIFO (First In, First Out) buffer, facilitating data exchange between tasks. Data is appended to the end of the queue and retrieved from the front. The message size and the maximum number of messages that can be stored are fixed and determined during the creation of the queue object.
During queue creation, an optional name may be specified, enabling tasks to open the object using the osOpenQueue function. When the queue is no longer required, it should be closed using osCloseHandle. The queue is deleted only after it has been closed by all tasks that referenced it. Further details can be found in the system objects management section.
If no osOpen* functions are utilized in the application, the system ignores object names and the code associated with name management is excluded from the build. This reduces the final size of the output image. For more information regarding naming conventions and object opening, see the system objects management section.
For additional details regarding queues, refer to the queue objects section.
This function is available only when the OS_USE_QUEUE and OS_OPEN_QUEUE_FUNC constants are both set to 1. If the function is not required, set OS_OPEN_QUEUE_FUNC to 0 to reduce the output code size.
| Version: | 1.0 |
|---|---|
| Header file: | OS_Queue.h (include OS_API.h) |
| See also: | HANDLE, NULL_HANDLE, OS_OPEN_QUEUE_FUNC, OS_USE_QUEUE, osCloseHandle, osCreateQueue, osGetLastError, queues, SYSNAME, system objects management |