File ThreadSafeQueue.c

FileList > core > ThreadSafeQueue.c

Go to the source code of this file

  • #include "ThreadSafeQueue.h"
  • #include <stdlib.h>
  • #include <string.h>
  • #include "Log.h"
  • #include "AssertLib.h"

Public Functions

Type Name
void TSQ_DeInit (struct ThreadSafeQueue * pQueue, u32 itemSize, u32 queueSizeItems)
bool TSQ_Dequeue (struct ThreadSafeQueue * pQueue, void * pOut)
void TSQ_Enqueue (struct ThreadSafeQueue * pQueue, const void * pIn)
void TSQ_Init (struct ThreadSafeQueue * pQueue, u32 itemSize, u32 queueSizeItems, OnTSQueueWrapAroundFn wrapAroundCallback)

Public Static Functions

Type Name
void AdvanceQueueHead (struct ThreadSafeQueue * pQueue)
void AdvanceQueueTail (struct ThreadSafeQueue * pQueue)

Public Functions Documentation

function TSQ_DeInit

void TSQ_DeInit (
    struct ThreadSafeQueue * pQueue,
    u32 itemSize,
    u32 queueSizeItems
) 

function TSQ_Dequeue

bool TSQ_Dequeue (
    struct ThreadSafeQueue * pQueue,
    void * pOut
) 

Parameters:

  • pQueue
  • pOut

Returns:

true if something dequeued, false if queue is empty


function TSQ_Enqueue

void TSQ_Enqueue (
    struct ThreadSafeQueue * pQueue,
    const void * pIn
) 

Parameters:

  • pQueue
  • pIn

function TSQ_Init

void TSQ_Init (
    struct ThreadSafeQueue * pQueue,
    u32 itemSize,
    u32 queueSizeItems,
    OnTSQueueWrapAroundFn wrapAroundCallback
) 

Parameters:

  • pQueue
  • itemSize
  • queueSizeItems
  • wrapAroundCallback

Public Static Functions Documentation

function AdvanceQueueHead

static void AdvanceQueueHead (
    struct ThreadSafeQueue * pQueue
) 

function AdvanceQueueTail

static void AdvanceQueueTail (
    struct ThreadSafeQueue * pQueue
) 


The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/src/core/ThreadSafeQueue.c