10 #ifndef K_API_MSG_QUEUE_H
11 #define K_API_MSG_QUEUE_H
208 #include <kApi/Threads/kMsgQueue.x.h>
kStatus kMsgQueue_Remove(kMsgQueue queue, void *item, k64u timeout)
Removes an item from the queue.
kStatus kMsgQueue_SetDropHandler(kMsgQueue queue, kMsgQueueDropFx onDrop, kPointer receiver)
Sets the callback used when dropping an item.
Represents a 64-bit unsigned integer.
Represents a void pointer.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kSize kMsgQueue_Count(kMsgQueue queue)
Reports the current count of queue items.
kStatus kMsgQueue_Reserve(kMsgQueue queue, kSize count)
Reserves memory for the specified number of items.
kStatus kMsgQueue_Purge(kMsgQueue queue)
Disposes any elements in the queue and sets the count of queue items to zero.
kSize kMsgQueue_MaxCount(kMsgQueue queue)
Reports the maximum count of items in the queue.
typedef kStatus(kCall *kMsgQueueDropFx)(kPointer receiver
Defines the signature of a callback function to handle dropped items.
kStatus kMsgQueue_SetMaxSize(kMsgQueue queue, kSize size)
Adjusts the maximum amount of data retained by the queue.
kSize kMsgQueue_ItemSize(kQueue queue)
Returns the queue element size.
Core Zen type declarations.
Represents a synchronized FIFO queue with an optional maximum size or count capacity.
Represents arguments passed in a kMsgQueue drop callback.
Definition: kMsgQueue.h:22
k64u kMsgQueue_DropCount(kMsgQueue queue)
Reports the count of dropped items.
kSize kMsgQueue_DataSize(kMsgQueue queue)
Reports the current amount of data stored in the queue (in bytes).
Represents metadata about a type (class, interface, or value).
Represents a FIFO queue implemented with a dynamic array.
Represents an error code.
kStatus kMsgQueue_Clear(kMsgQueue queue)
Removes all items from the queue.
#define kCall
kApi standard function calling convention.
Definition: kApiDef.h:17
kStatus kMsgQueue_SetMaxCount(kMsgQueue queue, kSize count)
Adjusts the maximum count of items retained by the queue.
kSize kMsgQueue_MaxSize(kMsgQueue queue)
Reports the maximum total data size of all items in the queue.
void * item
Pointer to the item to be dropped.
Definition: kMsgQueue.h:24
kStatus kMsgQueue_Add(kMsgQueue queue, void *item)
Adds an item to the queue.
kType kMsgQueue_ItemType(kMsgQueue queue)
Reports the type of element stored in the queue.
kStatus kMsgQueue_Construct(kMsgQueue *queue, kType itemType, kAlloc allocator)
Constructs a kMsgQueue object.