HANDLE osCreatePtrQueue( SYSNAME Name, INDEX MaxCount );
The name of the object (may be NULL).
The maximum number of messages that the queue can store.
Returns a handle to the newly created pointer queue object upon success, or NULL_HANDLE on failure. Call the osGetLastError function to retrieve extended error information.
This function creates a pointer queue object.
The pointer queue enables data exchange between tasks using a FIFO (First In, First Out) implementation. Data items are appended to the end of the queue and retrieved from the beginning. The pointer queue stores a fixed number of messages of the PVOID type. The capacity of the queue is defined during creation by the MaxCount parameter.
An optional object name may be specified during creation, allowing other tasks to access the queue via the osOpenPtrQueue function. When a pointer queue is no longer required, it should be closed using osCloseHandle. The object is deleted only after all tasks that opened the handle have closed it. Further details can be found in the System Objects Management section.
If no osOpen* functions are utilized within the application, the system ignores object names and excludes the name management code to reduce the final executable size. For more information regarding object naming and opening, refer to the System Objects Management section.
For additional information regarding pointer queue objects, refer to the Pointer Queues section.
This function is available only when the OS_USE_PTR_QUEUE constant is set to 1.
| Version: | 1.0 |
|---|---|
| Header file: | OS_PtrQueue.h (include OS_API.h) |
| See also: | INDEX, NULL, NULL_HANDLE, OS_OPEN_PTR_QUEUE_FUNC, osCloseHandle, osGetLastError, osOpenPtrQueue, queue of pointers, SYSNAME, system objects management |