11 #ifndef SRC_SPHDIRECTPCQUEUE_H_
12 #define SRC_SPHDIRECTPCQUEUE_H_
161 int catcode,
int subcode)
169 entrytemp.
idUnit = entry_template;
194 char *ptr = (
char*)directHandle +
sizeof (
sphLFEntry_t);
216 uintptr_t ptr = (uintptr_t)directHandle;
217 uintptr_t adjust = alignval - 1;
218 uintptr_t mask = ~adjust;
240 uintptr_t ptr = (uintptr_t)directptr;
241 uintptr_t adjust = alignval - 1;
242 uintptr_t mask = ~adjust;
244 ptr = ((ptr + incval + adjust) & mask);
291 printf (
"SPHLFEntryCategory(%p) entry=%p id=%x\n",
313 printf (
"SPHLFEntrySubcat(%p) entry=%p id=%x\n",
__C__ SPHLFEntryDirect_t SPHSinglePCQueueGetNextCompleteDirectSpinPause(SPHSinglePCQueue_t queue)
Allows the consumer to get the next completed queue entry from the specified single producer single c...
static int SPHLFEntryDirectIsTimestamped(SPHLFEntryDirect_t directHandle)
Return the status of the entry specified by the direct entry handle.
Definition: sphdirectpcqueue.h:270
__C__ int SPHSinglePCQueueEntryIsCompleteDirect(SPHLFEntryDirect_t directHandle)
Return the status of the entry specified by the direct entry handle.
__C__ SPHLFEntryDirect_t SPHSinglePCQueueGetNextCompleteDirect(SPHSinglePCQueue_t queue)
Allows the consumer to get the next completed queue entry from the specified single producer single c...
static void * SPHLFEntryDirectGetFreePtr(SPHLFEntryDirect_t directHandle)
Return the first free byte address for the direct entry specified by the direct entry handle...
Definition: sphdirectpcqueue.h:192
sphLFEntryID_t idUnit
Definition: sphlfentry.h:83
__C__ sphLFEntryID_t SPHSinglePCQueueGetEntryTemplate(SPHSinglePCQueue_t queue)
Return the entry template for an existing Lock Free Single Producer Single Consumer Queue...
static int SPHLFEntryDirectIsComplete(SPHLFEntryDirect_t directHandle)
Return the status of the entry specified by the direct entry handle.
Definition: sphdirectpcqueue.h:256
static void * SPHLFEntryDirectGetPtrAligned(SPHLFEntryDirect_t directHandle, size_t alignval)
Return the first free byte address, with required alignment, within the direct entry specified by the...
Definition: sphdirectpcqueue.h:213
Shared Persistent Heap, logger/queue etc event entry status, update, and access functions.
__C__ SPHLFEntryDirect_t SPHSinglePCQueueAllocStrideDirectSpin(SPHSinglePCQueue_t queue)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
Type and functions for SAS atomic operations.
__C__ SPHLFEntryDirect_t SPHSinglePCQueueGetNextEntryDirect(SPHSinglePCQueue_t queue)
Allows the consumer to get the next allocated queue entry from the specified single producer single c...
unsigned int timestamped
Definition: sphlfentry.h:63
__C__ int SPHSinglePCQueueFreeNextEntryDirect(SPHSinglePCQueue_t queue, SPHLFEntryDirect_t next_entry)
Allows the consumer to free the queue entry it just processed (using SPHSinglePCQueueGetNextComplete)...
static void * SPHLFEntryDirectIncAndAlign(void *directptr, size_t incval, size_t alignval)
Return the next free byte address within direct entry specified by a current address within that dire...
Definition: sphdirectpcqueue.h:238
__C__ SPHLFEntryDirect_t SPHSinglePCQueueAllocStrideDirect(SPHSinglePCQueue_t queue)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
#define sas_read_barrier()
Definition: sasatom.h:56
__C__ SPHLFEntryDirect_t SPHSinglePCQueueGetNextCompleteDirectSpin(SPHSinglePCQueue_t queue)
Allows the consumer to get the next completed queue entry from the specified single producer single c...
sphLFEntryLayout_t detail
Definition: sphlfentry.h:85
static int SPHLFEntryDirectComplete(SPHLFEntryDirect_t directHandle, sphLFEntryID_t entry_template, int catcode, int subcode)
Marks the entry specified by the entry handle as complete. Also executes any memory barriers required...
Definition: sphdirectpcqueue.h:159
static int SPHLFEntryDirectSubcat(SPHLFEntryDirect_t directHandle)
Return the entry sub-category for the entry specified by the direct entry handle. ...
Definition: sphdirectpcqueue.h:308
unsigned int sphLFEntryID_t
Aggregate type for handling sphLogEntryLayout_t.
Definition: sphlfentry.h:77
__C__ SPHLFEntryDirect_t SPHSinglePCQueueAllocStrideDirectSpinPause(SPHSinglePCQueue_t queue)
Allows the producer thread to allocate and initialize the header of a queue entry for access...
Union of Entry details with 32-bit word for atomic update.
Definition: sphlfentry.h:81
#define __C__
ignore this macro behind the curtain
Definition: sphdirectpcqueue.h:134
unsigned int subcat
Definition: sphlfentry.h:71
void * SPHLFEntryDirect_t
Instance of a Lock Free event direct data Handle.
Definition: sphdirectpcqueue.h:146
unsigned int category
Definition: sphlfentry.h:69
void * SPHSinglePCQueue_t
Handle to an instance of SPH Lock Free Single Producer, Single Consumer Queue.
Definition: sphsinglepcqueue.h:180
Shared Persistent Heap, single producer single consumer queue. For shared memory multi-thread/multi-c...
unsigned int valid
Definition: sphlfentry.h:61
static int SPHLFEntryDirectCategory(SPHLFEntryDirect_t directHandle)
Return the entry category for the entry specified by the direct entry handle.
Definition: sphdirectpcqueue.h:286