KasperskyOS Community Edition 1.1

KosQueueCreate()

This function is declared in the kos/queue.h file.

KosQueueHandle KosQueueCreate(unsigned objCount,

unsigned objSize,

unsigned objAlign,

void *buffer);

This function creates a queue of objects (fifo) and the buffer associated with this queue.

Parameters:

  • objCount is the maximum number of objects in the queue.
  • objSize is the object size (bytes).
  • objAlign is the object alignment in bytes, and must be a power of two.
  • buffer is the pointer to the external buffer for objects; if it is set equal to RTL_NULL, the buffer will be allocated by using the KosMemAlloc() function.

Returns the handle of the created queue and RTL_NULL if there is an error.