osCreatePtrQueue function
Declaration:
HANDLE osCreatePtrQueue(
  SYSNAME Name,
  INDEX MaxCount
);
Parameters:
Name

Name of the object (may be NULL).

MaxCount

The maximal number of messages that can be stored in the queue.

Return value:

The return value is a handle to the created queue of pointers object when success or NULL_HANDLE on failure. Use osGetLastErrorfunction to obtain extended error information.

Description:

Function creates a queue of pointers object.

The queue of pointers allows to exchange the data between tasks. It is a FIFO (First In, First Out) based queue implementation. The data are put in the end of queue and read from its beginning. The queue of pointers allows storing a defined number of messages of PVOID type. The message size and the maximal number of messages is restricted and determined during queue creation in the MaxCount parameter.

During queue of pointers creation, an optional object name may be specified. It makes tasks able to open it by osOpenPtrQueue function. The non-used queue of pointers should be closed with the osCloseHandle. Object will be deleted when it is closed by all tasks that opened it. More information you can find in the system objects management section.

If all of the osOpen* functions are not used, the system ignores an object name and the code used to name management will be removed. It will reduce final size of the output code. For more information about the names and object opening see the system objects managementsection.

For more information about the queue of pointers objects see the queue of pointers section.

Function is available only, when the value of OS_USE_PTR_QUEUE constant is set to 1.

SpaceShadow documentation