Loading...
Searching...
No Matches
sphlflogentry.h
Go to the documentation of this file.
/*
* Copyright (c) 2011-2014 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation, Steven Munroe - initial API and implementation
*/
#ifndef __SPH_LOCK_FREE_LOGENTRY_H
#define __SPH_LOCK_FREE_LOGENTRY_H
#include <string.h>
#include "sasatom.h"
#include "sphlflogger.h"
static inline int
SPHLFLogEntryStrongComplete (SPHLFLoggerHandle_t *handlespace)
{
int rc = 0;
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphLogEntry_t entrytemp;
sas_read_barrier();
entrytemp.idUnit = entryPtr->entryID.idUnit;
entrytemp.detail.valid = 1;
entryPtr->entryID.idUnit = entrytemp.idUnit;
return rc;
}
static inline int
SPHLFLogEntryWeakComplete (SPHLFLoggerHandle_t *handlespace)
{
int rc = 0;
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphLogEntry_t entrytemp;
entrytemp.idUnit = entryPtr->entryID.idUnit;
entrytemp.detail.valid = 1;
entryPtr->entryID.idUnit = entrytemp.idUnit;
return rc;
}
static inline int
SPHLFLogEntryComplete (SPHLFLoggerHandle_t *handlespace)
{
int rc = 0;
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphLogEntry_t entrytemp;
sas_write_barrier();
entrytemp.idUnit = entryPtr->entryID.idUnit;
entrytemp.detail.valid = 1;
entryPtr->entryID.idUnit = entrytemp.idUnit;
return rc;
}
static inline int
SPHLFLogEntryIsComplete (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
return (entryPtr->entryID.detail.valid == 1);
}
static inline int
SPHLFLogEntryIsTimestamped (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
return ((entryPtr->entryID.detail.valid == 1)
&&(entryPtr->entryID.detail.timestamped == 1));
}
static inline sphtimer_t
SPHLFLogEntryTimeStamp (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphtimer_t result = 0;
if ((entryPtr->entryID.detail.valid == 1)
&&(entryPtr->entryID.detail.timestamped == 1))
result = entryPtr->timeStamp;
return result;
}
static inline sphpid16_t
SPHLFLogEntryPID (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphpid16_t result = 0;
if ((entryPtr->entryID.detail.valid == 1)
&&(entryPtr->entryID.detail.timestamped == 1))
result = entryPtr->PID;
return result;
}
static inline sphpid16_t
SPHLFLogEntryTID (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
sphpid16_t result = 0;
if ((entryPtr->entryID.detail.valid == 1)
&&(entryPtr->entryID.detail.timestamped == 1))
result = entryPtr->TID;
return result;
}
static inline SPHLFLogHeader_t*
SPHLFLogEntryHeader (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
if (entryPtr->entryID.detail.valid != 1)
entryPtr = NULL;
return entryPtr;
}
static inline int
SPHLFLogEntryCategory (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
int result = -1;
#if 0
printf ("SPHLFLogEntryCategory(%p) entry=%p id=%x\n",
handlespace, entryPtr, entryPtr->entryID.idUnit);
#endif
if (entryPtr->entryID.detail.valid == 1)
result = entryPtr->entryID.detail.category;
return result;
}
static inline int
SPHLFLogEntrySubcat (SPHLFLoggerHandle_t *handlespace)
{
SPHLFLogHeader_t *entryPtr = handlespace->entry;
int result = -1;
#if 0
printf ("SPHLFLogEntrySubcat(%p) entry=%p id=%x\n",
handlespace, entryPtr, entryPtr->entryID.idUnit);
#endif
if (entryPtr->entryID.detail.valid == 1)
result = entryPtr->entryID.detail.subcat;
return result;
}
static inline void*
SPHLFLogEntryGetFreePtr (SPHLFLoggerHandle_t *handle)
{
char *ptr = handle->next;
return (void*)ptr;
}
#define SPHLOGENTRYGETSTRUCTPTR(__handle, __struct) SPHLFlogEntryGetStructPtr(__handle, sizeof(__struct), __alignof__(__struct))
static inline void*
SPHLFlogEntryGetStructPtr (SPHLFLoggerHandle_t *handle,
unsigned long __size, unsigned long __align)
{
char *ptr = (char*)handle->next;
unsigned long len = handle->remaining;
unsigned long adjust = __align - 1;
unsigned long mask = ~adjust;
ptr = (char*)
((((unsigned long)ptr)
+ adjust)
& mask);
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= __size)
{
handle->next = ptr + __size;
handle->remaining = len - __size;
} else {
ptr = NULL;
}
return ptr;
}
#define SPHLOGENTRYALLOCSTRUCT(__handle, __struct) SPHLFlogEntryAllocStruct(__handle, sizeof(__struct), __alignof__(__struct))
static inline void*
SPHLFlogEntryAllocStruct (SPHLFLoggerHandle_t *handle,
unsigned long __size, unsigned long __align)
{
char *ptr = (char*)handle->next;
unsigned long len = handle->remaining;
unsigned long adjust = __align - 1;
unsigned long mask = ~adjust;
ptr = (char*)
((((unsigned long)ptr)
+ adjust)
& mask);
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= __size)
{
handle->next = ptr + __size;
handle->remaining = len - __size;
} else {
ptr = NULL;
}
return ptr;
}
static inline int
SPHLFlogEntryAddString (SPHLFLoggerHandle_t *handle,
char *value)
{
char *ptr = handle->next;
unsigned short int len = handle->remaining;
int vlen = (strlen(value) + 1);
int rc = 0;
if (len >= vlen)
{
strcpy (ptr, value);
ptr += vlen;
len -= vlen;
handle->next = ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddChar (SPHLFLoggerHandle_t *handle,
char value)
{
char *ptr = handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
if (len >= sizeof(char))
{
*ptr++ = value;
len -= sizeof(char);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddShort (SPHLFLoggerHandle_t *handle,
short int value)
{
short int *ptr = (short int*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
unsigned long adjust = __alignof__(short int) -1;
unsigned long mask = ~adjust;
ptr = (short int*)
((((unsigned long)ptr)
+ adjust)
& mask);
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(short int))
{
*ptr++ = value;
len -= sizeof(short);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddInt (SPHLFLoggerHandle_t *handle,
int value)
{
int *ptr = (int*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (int*)(((((unsigned long)ptr))
+ (__alignof__(int) -1))
& (~(__alignof__(int) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(int))
{
*ptr++ = value;
len -= sizeof(int);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddLong (SPHLFLoggerHandle_t *handle,
long value)
{
long *ptr = (long*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (long*)(((((unsigned long)ptr))
+ (__alignof__(long) -1))
& (~(__alignof__(long) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(long))
{
*ptr++ = value;
len -= sizeof(long);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddPtr (SPHLFLoggerHandle_t *handle,
void *value)
{
void **ptr = (void**)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (void**)(((((unsigned long)ptr))
+ (__alignof__(void*) -1))
& (~(__alignof__(void*) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(void*))
{
*ptr++ = value;
len -= sizeof(void*);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddLongLong (SPHLFLoggerHandle_t *handle,
long long value)
{
long long *ptr = (long long*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (long long*)(((((unsigned long)ptr))
+ (__alignof__(long long) -1))
& (~(__alignof__(long long) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(long long))
{
*ptr++ = value;
len -= sizeof(long long);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddFloat (SPHLFLoggerHandle_t *handle,
float value)
{
float *ptr = (float*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (float*)(((((unsigned long)ptr))
+ (__alignof__(float) -1))
& (~(__alignof__(float) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(float))
{
*ptr++ = value;
len -= sizeof(float);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline int
SPHLFlogEntryAddDouble (SPHLFLoggerHandle_t *handle,
double value)
{
double *ptr = (double*)handle->next;
unsigned short int len = handle->remaining;
int rc = 0;
ptr = (double*)(((((unsigned long)ptr))
+ (__alignof__(double) -1))
& (~(__alignof__(double) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(double))
{
*ptr++ = value;
len -= sizeof(double);
handle->next = (char*)ptr;
handle->remaining = len;
} else {
rc = -1;
}
return rc;
}
static inline char
SPHLFlogEntryGetNextChar (SPHLFLoggerHandle_t *handle)
{
char *ptr = handle->next;
unsigned short int len = handle->remaining;
char value = 0;
if (len >= sizeof(char))
{
value = *ptr++;
len -= sizeof(char);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline char*
SPHLFlogEntryGetNextString (SPHLFLoggerHandle_t *handle)
{
char *ptr = handle->next;
unsigned short int len = handle->remaining;
int vlen = (strlen(ptr) + 1);
char *value = 0;
if (len >= vlen)
{
value = ptr;
ptr += vlen;
len -= vlen;
handle->next = ptr;
handle->remaining = len;
}
return value;
}
static inline short int
SPHLFlogEntryGetNextShort (SPHLFLoggerHandle_t *handle)
{
short int *ptr = (short int*)handle->next;
unsigned short int len = handle->remaining;
unsigned long adjust = __alignof__(short int) -1;
unsigned long mask = ~adjust;
short int value = 0;
ptr = (short int*)
((((unsigned long)ptr)
+ adjust)
& mask);
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(short int))
{
value = *ptr++;
len -= sizeof(short);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline int
SPHLFlogEntryGetNextInt (SPHLFLoggerHandle_t *handle)
{
int *ptr = (int*)handle->next;
unsigned short int len = handle->remaining;
int value = 0;
ptr = (int*)(((((unsigned long)ptr))
+ (__alignof__(int) -1))
& (~(__alignof__(int) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(int))
{
value = *ptr++;
len -= sizeof(int);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline long
SPHLFlogEntryGetNextLong (SPHLFLoggerHandle_t *handle)
{
long *ptr = (long*)handle->next;
unsigned short int len = handle->remaining;
long value = 0;
ptr = (long*)(((((unsigned long)ptr))
+ (__alignof__(long) -1))
& (~(__alignof__(long) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(long))
{
value = *ptr++;
len -= sizeof(long);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline void*
SPHLFlogEntryGetNextPtr (SPHLFLoggerHandle_t *handle)
{
void **ptr = (void**)handle->next;
unsigned short int len = handle->remaining;
void *value = NULL;
ptr = (void**)(((((unsigned long)ptr))
+ (__alignof__(void*) -1))
& (~(__alignof__(void*) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(void*))
{
value = *ptr++;
len -= sizeof(void*);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline long long
SPHLFlogEntryGetNextLongLong (SPHLFLoggerHandle_t *handle)
{
long long *ptr = (long long*)handle->next;
unsigned short int len = handle->remaining;
long long value = 0LL;
ptr = (long long*)(((((unsigned long)ptr))
+ (__alignof__(long long) -1))
& (~(__alignof__(long long) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(long long))
{
value = *ptr++;
len -= sizeof(long long);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline float
SPHLFlogEntryGetNextFloat (SPHLFLoggerHandle_t *handle)
{
float *ptr = (float*)handle->next;
unsigned short int len = handle->remaining;
float value = 0.0;
ptr = (float*)(((((unsigned long)ptr))
+ (__alignof__(float) -1))
& (~(__alignof__(float) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(float))
{
value = *ptr++;
len -= sizeof(float);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
static inline double
SPHLFlogEntryGetNextDouble (SPHLFLoggerHandle_t *handle)
{
double *ptr = (double*)handle->next;
unsigned short int len = handle->remaining;
double value = 0.0;
ptr = (double*)(((((unsigned long)ptr))
+ (__alignof__(double) -1))
& (~(__alignof__(double) -1)));
if ((unsigned long)ptr != (unsigned long)handle->next)
{
len -= ((unsigned long)ptr
- (unsigned long)handle->next);
}
if (len >= sizeof(double))
{
value = *ptr++;
len -= sizeof(double);
handle->next = (char*)ptr;
handle->remaining = len;
}
return value;
}
#endif /* __SPH_LOCK_FREE_LOGENTRY_H */
sasatom.h
Type and functions for SAS atomic operations.
sas_read_barrier
#define sas_read_barrier()
Definition sasatom.h:56
sas_write_barrier
#define sas_write_barrier()
Definition sasatom.h:51
SPHLFlogEntryAllocStruct
static void * SPHLFlogEntryAllocStruct(SPHLFLoggerHandle_t *handle, unsigned long __size, unsigned long __align)
Allocate space for struct starting at the next free location within the logger entry.
Definition sphlflogentry.h:371
SPHLFlogEntryGetNextPtr
static void * SPHLFlogEntryGetNextPtr(SPHLFLoggerHandle_t *handle)
Return the next void* from the logger entry via the current next value pointer. Leading bytes may be ...
Definition sphlflogentry.h:900
SPHLFlogEntryGetNextLong
static long SPHLFlogEntryGetNextLong(SPHLFLoggerHandle_t *handle)
Return the next long int from the logger entry via the current next value pointer....
Definition sphlflogentry.h:864
SPHLFLogEntryStrongComplete
static int SPHLFLogEntryStrongComplete(SPHLFLoggerHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. Also executes any memory barriers required...
Definition sphlflogentry.h:65
SPHLFlogEntryGetNextString
static char * SPHLFlogEntryGetNextString(SPHLFLoggerHandle_t *handle)
Return the pointer to the next C string from the logger entry via the current next value pointer....
Definition sphlflogentry.h:761
SPHLFLogEntryIsTimestamped
static int SPHLFLogEntryIsTimestamped(SPHLFLoggerHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition sphlflogentry.h:145
SPHLFlogEntryAddLongLong
static int SPHLFlogEntryAddLongLong(SPHLFLoggerHandle_t *handle, long long value)
Insert a long long int at the next free location within the logger entry.
Definition sphlflogentry.h:622
SPHLFlogEntryGetStructPtr
static void * SPHLFlogEntryGetStructPtr(SPHLFLoggerHandle_t *handle, unsigned long __size, unsigned long __align)
Return the correctly aligned pointer for a struct or array starting at the next free location within ...
Definition sphlflogentry.h:316
SPHLFlogEntryAddPtr
static int SPHLFlogEntryAddPtr(SPHLFLoggerHandle_t *handle, void *value)
Insert a void* at the next free location within the logger entry.
Definition sphlflogentry.h:584
SPHLFlogEntryAddFloat
static int SPHLFlogEntryAddFloat(SPHLFLoggerHandle_t *handle, float value)
Insert a float at the next free location within the logger entry.
Definition sphlflogentry.h:660
SPHLFlogEntryAddShort
static int SPHLFlogEntryAddShort(SPHLFLoggerHandle_t *handle, short int value)
Insert a short int at the next free location within the logger entry.
Definition sphlflogentry.h:467
SPHLFLogEntryWeakComplete
static int SPHLFLogEntryWeakComplete(SPHLFLoggerHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. No memory barriers are performance....
Definition sphlflogentry.h:88
SPHLFlogEntryGetNextShort
static short int SPHLFlogEntryGetNextShort(SPHLFLoggerHandle_t *handle)
Return the next short int from the logger entry via the current next value pointer....
Definition sphlflogentry.h:789
SPHLFLogEntryHeader
static SPHLFLogHeader_t * SPHLFLogEntryHeader(SPHLFLoggerHandle_t *handlespace)
Return the address for the entry header specified by the entry handle.
Definition sphlflogentry.h:217
SPHLFLogEntryTimeStamp
static sphtimer_t SPHLFLogEntryTimeStamp(SPHLFLoggerHandle_t *handlespace)
Return the time stamp value for the entry specified by the entry handle.
Definition sphlflogentry.h:160
SPHLFLogEntryGetFreePtr
static void * SPHLFLogEntryGetFreePtr(SPHLFLoggerHandle_t *handle)
Return the address first free byte for the entry specified by the entry handle.
Definition sphlflogentry.h:285
SPHLFlogEntryGetNextLongLong
static long long SPHLFlogEntryGetNextLongLong(SPHLFLoggerHandle_t *handle)
Return the next long long int from the logger entry via the current next value pointer....
Definition sphlflogentry.h:936
SPHLFlogEntryGetNextInt
static int SPHLFlogEntryGetNextInt(SPHLFLoggerHandle_t *handle)
Return the next int from the logger entry via the current next value pointer. Leading bytes may be sk...
Definition sphlflogentry.h:828
SPHLFLogEntryComplete
static int SPHLFLogEntryComplete(SPHLFLoggerHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. Also executes write memory barries require...
Definition sphlflogentry.h:111
SPHLFlogEntryAddString
static int SPHLFlogEntryAddString(SPHLFLoggerHandle_t *handle, char *value)
Insert a C string at the next free location within the logger entry.
Definition sphlflogentry.h:409
SPHLFLogEntryTID
static sphpid16_t SPHLFLogEntryTID(SPHLFLoggerHandle_t *handlespace)
Return the thread ID for the entry specified by the entry handle.
Definition sphlflogentry.h:198
SPHLFlogEntryAddInt
static int SPHLFlogEntryAddInt(SPHLFLoggerHandle_t *handle, int value)
Insert a int at the next free location within the logger entry.
Definition sphlflogentry.h:508
SPHLFLogEntrySubcat
static int SPHLFLogEntrySubcat(SPHLFLoggerHandle_t *handlespace)
Return the entry sub-category for the entry specified by the entry handle.
Definition sphlflogentry.h:255
SPHLFLogEntryIsComplete
static int SPHLFLogEntryIsComplete(SPHLFLoggerHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition sphlflogentry.h:132
SPHLFlogEntryGetNextDouble
static double SPHLFlogEntryGetNextDouble(SPHLFLoggerHandle_t *handle)
Return the next double from the logger entry via the current next value pointer. Leading bytes may be...
Definition sphlflogentry.h:1008
SPHLFLogEntryCategory
static int SPHLFLogEntryCategory(SPHLFLoggerHandle_t *handlespace)
Return the entry category for the entry specified by the entry handle.
Definition sphlflogentry.h:234
SPHLFlogEntryAddChar
static int SPHLFlogEntryAddChar(SPHLFLoggerHandle_t *handle, char value)
Insert a character at the next free location within the logger entry.
Definition sphlflogentry.h:439
SPHLFlogEntryAddDouble
static int SPHLFlogEntryAddDouble(SPHLFLoggerHandle_t *handle, double value)
Insert a double at the next free location within the logger entry.
Definition sphlflogentry.h:698
SPHLFLogEntryPID
static sphpid16_t SPHLFLogEntryPID(SPHLFLoggerHandle_t *handlespace)
Return the process ID for the entry specified by the entry handle.
Definition sphlflogentry.h:179
SPHLFlogEntryAddLong
static int SPHLFlogEntryAddLong(SPHLFLoggerHandle_t *handle, long value)
Insert a long int at the next free location within the logger entry.
Definition sphlflogentry.h:546
SPHLFlogEntryGetNextChar
static char SPHLFlogEntryGetNextChar(SPHLFLoggerHandle_t *handle)
Return the next char from the logger entry via the current next value pointer. The internal next valu...
Definition sphlflogentry.h:736
SPHLFlogEntryGetNextFloat
static float SPHLFlogEntryGetNextFloat(SPHLFLoggerHandle_t *handle)
Return the next float from the logger entry via the current next value pointer. Leading bytes may be ...
Definition sphlflogentry.h:972
sphlflogger.h
Shared Persistent Heap, logger. For shared memory multi-thread/multi-core applications....
sphpid16_t
unsigned short sphpid16_t
Common type for PID/TID values stored in Logger entries.
Definition sphlflogger.h:217
sphtimer_t
unsigned long long int sphtimer_t
Value from TB/TSC register (64-bits on all platforms).
Definition sphtimer.h:66
SPHLFLogHeader_t
Instance of a Lock Free Logger Entry Header.
Definition sphlflogger.h:223
SPHLFLogHeader_t::timeStamp
sphtimer_t timeStamp
Definition sphlflogger.h:231
SPHLFLogHeader_t::TID
sphpid16_t TID
Definition sphlflogger.h:229
SPHLFLogHeader_t::entryID
sphLogEntry_t entryID
Definition sphlflogger.h:225
SPHLFLogHeader_t::PID
sphpid16_t PID
Definition sphlflogger.h:227
SPHLFLoggerHandle_t
Instance of a Lock Free Logger Entry Handle.
Definition sphlflogger.h:244
SPHLFLoggerHandle_t::remaining
unsigned short int remaining
Definition sphlflogger.h:252
SPHLFLoggerHandle_t::next
char * next
Definition sphlflogger.h:248
SPHLFLoggerHandle_t::entry
SPHLFLogHeader_t * entry
Definition sphlflogger.h:246
sphLogEntryLayout_t::subcat
unsigned int subcat
Definition sphlflogger.h:198
sphLogEntryLayout_t::timestamped
unsigned int timestamped
Definition sphlflogger.h:192
sphLogEntryLayout_t::category
unsigned int category
Definition sphlflogger.h:196
sphLogEntryLayout_t::valid
unsigned int valid
Definition sphlflogger.h:190
sphLogEntry_t
Union of Entry details with 32-bit word for atomic update.
Definition sphlflogger.h:208
sphLogEntry_t::idUnit
sphLogEntryID_t idUnit
Definition sphlflogger.h:210
sphLogEntry_t::detail
sphLogEntryLayout_t detail
Definition sphlflogger.h:212