Kohi Game Engine
ring_queue Struct Reference

Represents a ring queue of a particular size. Does not resize dynamically. Naturally, this is a first in, first out structure. More...

#include <ring_queue.h>

Data Fields

u32 length
 The current number of elements contained. More...
 
u32 stride
 The size of each element in bytes. More...
 
u32 capacity
 The total number of elements available. More...
 
void * block
 The block of memory to hold the data. More...
 
b8 owns_memory
 Indicates if the queue owns its memory block. More...
 
i32 head
 The index of the head of the list. More...
 
i32 tail
 The index of the tail of the list. More...
 

Detailed Description

Represents a ring queue of a particular size. Does not resize dynamically. Naturally, this is a first in, first out structure.

Field Documentation

◆ block

void* block

The block of memory to hold the data.

◆ capacity

u32 capacity

The total number of elements available.

◆ head

i32 head

The index of the head of the list.

◆ length

u32 length

The current number of elements contained.

◆ owns_memory

b8 owns_memory

Indicates if the queue owns its memory block.

◆ stride

u32 stride

The size of each element in bytes.

◆ tail

i32 tail

The index of the tail of the list.


The documentation for this struct was generated from the following file: