12 #ifndef __SPH_MULTI_PC_QUEUE_H
13 #define __SPH_MULTI_PC_QUEUE_H
160 #define SPHMPMCQ_CIRCULAR (1)
162 #define SPHMPMCQ_CIRCULAR_WRAPPED (1<<1)
164 #define SPHMPMCQ_CIRCULAR_NOTFIRST (1<<2)
166 #define SPHMPMCQ_CACHE_PREFETCH0 (1<<3)
168 #define SPHMPMCQ_CACHE_PREFETCH1 (1<<4)
170 #define SPHMPMCQ_CIRCULAR_RESETMASK (SPHMPCQ_CIRCULAR | \
171 SPHMPCQ_CACHE_PREFETCH0 | \
172 SPHMPCQ_CACHE_PREFETCH1)
207 unsigned short entry_stride,
208 unsigned int options);
236 unsigned short stride);
258 #if defined(SPH_INTERNAL)
293 extern __C__ block_size_t
__C__ SPHMPMCQ_t SPHMPMCQCreateWithStride(block_size_t buf_size, unsigned short stride)
Allocate and initialize a shared storage block as a Lock Free Multi Producer Multi Consumer Queue...
__C__ SPHMPMCQ_t SPHMPMCQInitWithStride(void *buf_seg, block_size_t buf_size, unsigned short entry_stride, unsigned int options)
Initialize a shared storage block as a Multi Producer Multi Consumer Queue with a fixed entry stride...
__C__ int SPHMPMCQSetCachePrefetch(SPHMPMCQ_t queue, int prefetch)
Set the cache-line prefetch options for entry allocate.
__C__ int SPHMPMCQEntryDirectIsComplete(SPHLFEntryDirect_t directHandle)
Return the status of the entry specified by the direct entry handle.
__C__ SPHLFEntryDirect_t SPHMPMCQAllocStrideDirectHTM(SPHMPMCQ_t queue)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
__C__ SPHMPMCQ_t SPHMPMCQCreate(block_size_t buf_size)
Allocate and initialize a shared storage block as a Multi Producer Multi Consumer Queue...
__C__ int SPHMPMCQIsFull(SPHMPMCQ_t queue)
Return the status of the specified queue.
__C__ SPHLFEntryDirect_t SPHMPMCQGetNextCompleteDirectHTM(SPHMPMCQ_t queue)
Allows the consumer to get the next completed queue entry from the specified multi producer multi con...
__C__ block_size_t SPHMPMCQFreeSpace(SPHMPMCQ_t queue)
Returns the amount of free space (in bytes) remaining in the specified queue.
void * SPHMPMCQ_t
Handle to an instance of SPH Multi Producer, Multi Consumer Queue.
Definition: sphmultipcqueue.h:147
Shared Persistent Heap, logger/queue etc event entry status, update, and access functions.
__C__ SPHMPMCQ_t SPHMPMCQInit(void *buf_seg, block_size_t buf_size)
Initialize a shared storage block as a MPMC Queue.
__C__ int SPHMPMCQDestroy(SPHMPMCQ_t queue)
Destroys the queue and frees the SAS storage for reuse.
__C__ SPHLFEntryDirect_t SPHSPMCQAllocStrideDirect(SPHMPMCQ_t queue)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
Shared Persistent Heap, single producer single consumer queue direct API.
__C__ int SPHMPMCQPrefetch(SPHMPMCQ_t queue)
Prefetch pages from the specific queue.
unsigned long longPtr_t
unsigned int type, consistent with the size of a pointer and used for pointer calculations ...
Definition: sphlflogger.h:183
__C__ SPHLFEntryDirect_t SPHMPSCQGetNextCompleteDirect(SPHMPMCQ_t queue)
Allows the consumer to get the next completed queue entry from the specified multi producer multi con...
__C__ int SPHMPMCQGetStride(SPHMPMCQ_t queue)
Return the entry stride for an existing Lock Free Multi Producer Multi Consumer Queue.
unsigned int sphLFEntryID_t
Aggregate type for handling sphLogEntryLayout_t.
Definition: sphlfentry.h:77
#define __C__
ignore this macro behind the curtain
Definition: sphmultipcqueue.h:153
void * SPHLFEntryDirect_t
Instance of a Lock Free event direct data Handle.
Definition: sphdirectpcqueue.h:146
__C__ SPHLFEntryDirect_t SPHMPMCQGetNextEntry(SPHMPMCQ_t queue)
Allows the consumer to get the next allocated queue entry from the specified multi producer multi con...
__C__ int SPHMPMCQGetEntries(SPHMPMCQ_t queue)
Return the total number of entries for an existing Lock Free Multi Producer Multi Consumer Queue...
__C__ sphLFEntryID_t SPHMPMCQGetEntryTemplate(SPHMPMCQ_t queue)
Return the entry template for an existing Lock Free Multi Producer Multi Consumer Queue...
__C__ int SPHMPMCQIsEmpty(SPHMPMCQ_t queue)
Return the status of the specified queue.
__C__ int SPHMPMCQFreeEntryDirect(SPHMPMCQ_t queue, SPHLFEntryDirect_t entry)
Allows the consumer to free the queue entry it just processed (using SPHMPMCQGetNextComplete), from the specified multi producer multi consumer queue.