12 #ifndef __SPH_SINGLE_PC_QUEUE_H
13 #define __SPH_SINGLE_PC_QUEUE_H
193 #define SPHSPCQUEUE_CIRCULAR (1)
195 #define SPHSPCQUEUE_CIRCULAR_WRAPED (1<<1)
197 #define SPHSPCQUEUE_CIRCULAR_NOTFIRST (1<<2)
199 #define SPHSPCQUEUE_CACHE_PREFETCH0 (1<<3)
201 #define SPHSPCQUEUE_CACHE_PREFETCH1 (1<<4)
203 #define SPHSPCQUEUE_CIRCULAR_RESETMASK (SPHSPCQUEUE_CIRCULAR | \
204 SPHSPCQUEUE_CACHE_PREFETCH0 | \
205 SPHSPCQUEUE_CACHE_PREFETCH1)
241 unsigned short entry_stride,
242 unsigned int options);
270 unsigned short stride);
328 int catcode,
int subcode,
359 int catcode,
int subcode,
444 extern __C__ block_size_t
__C__ SPHLFEntryHandle_t * SPHSinglePCQueueGetNextComplete(SPHSinglePCQueue_t queue, SPHLFEntryHandle_t *handlespace)
Allows the consumer to get the next completed queue entry from the specified single producer single c...
__C__ int SPHSinglePCQueueFull(SPHSinglePCQueue_t queue)
Return the status of the specified queue.
__C__ SPHSinglePCQueue_t SPHSinglePCQueueInit(void *buf_seg, block_size_t buf_size)
Initialize a shared storage block as a Lock Free PC Queue.
__C__ void * SPHSinglePCQueueAllocRaw(SPHSinglePCQueue_t queue)
Allows the Producer thread to return the address of a (raw) queue entry allocated from the specified ...
Shared Persistent Heap, logger/queue etc event entry status, update, and access functions.
__C__ int SPHSinglePCQueueEntryComplete(SPHLFEntryHandle_t *entryhandle)
Allows the producer thread to mark the queue entry, specified by the entry handle, as complete. This makes the queue entry accessible to the consumer thread.
Instance of a Lock Free event data Entry Handle.
Definition: sphlfentry.h:115
__C__ int SPHSinglePCQueueGetStride(SPHSinglePCQueue_t queue)
Return the entry stride for an existing Lock Free Single Producer Single Consumer Queue...
__C__ SPHLFEntryHandle_t * SPHSinglePCQueueAllocStrideEntry(SPHSinglePCQueue_t queue, int catcode, int subcode, SPHLFEntryHandle_t *handlespace)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
__C__ int SPHSinglePCQueueDestroy(SPHSinglePCQueue_t queue)
Destroys the queue and frees the SAS storage for reuse.
unsigned long longPtr_t
unsigned int type, consistent with the size of a pointer and used for pointer calculations ...
Definition: sphlflogger.h:183
__C__ int SPHSinglePCQueueResetAsync(SPHSinglePCQueue_t queue)
Resets the specific queue to empty state asynchronously (without locking or atomic updates)...
__C__ SPHLFEntryHandle_t * SPHSinglePCQueueAllocStrideTimeStamped(SPHSinglePCQueue_t queue, int catcode, int subcode, SPHLFEntryHandle_t *handlespace)
Allows the producer thread to allocate and initialize the header, of a queue entry for access...
__C__ block_size_t SPHSinglePCQueueFreeSpace(SPHSinglePCQueue_t queue)
Returns the amount of free space (in bytes) remaining in the specified queue.
__C__ SPHSinglePCQueue_t SPHSinglePCQueueCreateWithStride(block_size_t buf_size, unsigned short stride)
Allocate and initialize a shared storage block as a Lock Free Single Producer Single Consumer Queue...
__C__ int SPHSinglePCQueueEntryIsComplete(SPHLFEntryHandle_t *entryhandle)
Return the status of the entry specified by the entry handle.
__C__ int SPHSinglePCQueueFreeNextEntry(SPHSinglePCQueue_t queue)
Allows the consumer to free the queue entry it just processed (using SPHSinglePCQueueGetNextComplete)...
#define __C__
ignore this macro behind the curtain
Definition: sphsinglepcqueue.h:186
__C__ SPHSinglePCQueue_t SPHSinglePCQueueCreate(block_size_t buf_size)
Allocate and initialize a shared storage block as a Lock Free Single Producer Single Consumer Queue...
void * SPHSinglePCQueue_t
Handle to an instance of SPH Lock Free Single Producer, Single Consumer Queue.
Definition: sphsinglepcqueue.h:180
__C__ int SPHSinglePCQueueEmpty(SPHSinglePCQueue_t queue)
Return the status of the specified queue.
__C__ SPHSinglePCQueue_t SPHSinglePCQueueInitWithStride(void *buf_seg, block_size_t buf_size, unsigned short entry_stride, unsigned int options)
Initialize a shared storage block as a Lock Free Single Producer Single Consumer Queue with a fixed e...
__C__ int SPHSinglePCQueueSetCachePrefetch(SPHSinglePCQueue_t queue, int prefetch)
Set the cache-line prefetch options for entry allocate.
__C__ int SPHSinglePCQueuePrefetch(SPHSinglePCQueue_t queue)
Prefetch pages from the specific queue.