Shared Persistent Heap Data Environment Manual  1.1.0
sphlflogentry.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2014 IBM Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  */
11 
12 #ifndef __SPH_LOCK_FREE_LOGENTRY_H
13 #define __SPH_LOCK_FREE_LOGENTRY_H
14 
51 #include <string.h>
52 #include "sasatom.h"
53 #include "sphlflogger.h"
54 
55 
64 static inline int
66 {
67  int rc = 0;
68  SPHLFLogHeader_t *entryPtr = handlespace->entry;
69  sphLogEntry_t entrytemp;
70 
72  entrytemp.idUnit = entryPtr->entryID.idUnit;
73  entrytemp.detail.valid = 1;
74  entryPtr->entryID.idUnit = entrytemp.idUnit;
75 
76  return rc;
77 }
78 
87 static inline int
89 {
90  int rc = 0;
91  SPHLFLogHeader_t *entryPtr = handlespace->entry;
92  sphLogEntry_t entrytemp;
93 
94  entrytemp.idUnit = entryPtr->entryID.idUnit;
95  entrytemp.detail.valid = 1;
96  entryPtr->entryID.idUnit = entrytemp.idUnit;
97 
98  return rc;
99 }
100 
110 static inline int
112 {
113  int rc = 0;
114  SPHLFLogHeader_t *entryPtr = handlespace->entry;
115  sphLogEntry_t entrytemp;
116 
118  entrytemp.idUnit = entryPtr->entryID.idUnit;
119  entrytemp.detail.valid = 1;
120  entryPtr->entryID.idUnit = entrytemp.idUnit;
121 
122  return rc;
123 }
124 
131 static inline int
133 {
134  SPHLFLogHeader_t *entryPtr = handlespace->entry;
135 
136  return (entryPtr->entryID.detail.valid == 1);
137 }
138 
144 static inline int
146 {
147  SPHLFLogHeader_t *entryPtr = handlespace->entry;
148 
149  return ((entryPtr->entryID.detail.valid == 1)
150  &&(entryPtr->entryID.detail.timestamped == 1));
151 }
152 
159 static inline sphtimer_t
161 {
162  SPHLFLogHeader_t *entryPtr = handlespace->entry;
163  sphtimer_t result = 0;
164 
165  if ((entryPtr->entryID.detail.valid == 1)
166  &&(entryPtr->entryID.detail.timestamped == 1))
167  result = entryPtr->timeStamp;
168 
169  return result;
170 }
171 
178 static inline sphpid16_t
180 {
181  SPHLFLogHeader_t *entryPtr = handlespace->entry;
182  sphpid16_t result = 0;
183 
184  if ((entryPtr->entryID.detail.valid == 1)
185  &&(entryPtr->entryID.detail.timestamped == 1))
186  result = entryPtr->PID;
187 
188  return result;
189 }
190 
197 static inline sphpid16_t
199 {
200  SPHLFLogHeader_t *entryPtr = handlespace->entry;
201  sphpid16_t result = 0;
202 
203  if ((entryPtr->entryID.detail.valid == 1)
204  &&(entryPtr->entryID.detail.timestamped == 1))
205  result = entryPtr->TID;
206 
207  return result;
208 }
209 
216 static inline SPHLFLogHeader_t*
218 {
219  SPHLFLogHeader_t *entryPtr = handlespace->entry;
220 
221  if (entryPtr->entryID.detail.valid != 1)
222  entryPtr = NULL;
223 
224  return entryPtr;
225 }
226 
233 static inline int
235 {
236  SPHLFLogHeader_t *entryPtr = handlespace->entry;
237  int result = -1;
238 #if 0
239  printf ("SPHLFLogEntryCategory(%p) entry=%p id=%x\n",
240  handlespace, entryPtr, entryPtr->entryID.idUnit);
241 #endif
242  if (entryPtr->entryID.detail.valid == 1)
243  result = entryPtr->entryID.detail.category;
244 
245  return result;
246 }
247 
254 static inline int
256 {
257  SPHLFLogHeader_t *entryPtr = handlespace->entry;
258  int result = -1;
259 #if 0
260  printf ("SPHLFLogEntrySubcat(%p) entry=%p id=%x\n",
261  handlespace, entryPtr, entryPtr->entryID.idUnit);
262 #endif
263  if (entryPtr->entryID.detail.valid == 1)
264  result = entryPtr->entryID.detail.subcat;
265 
266  return result;
267 }
268 
284 static inline void*
286 {
287  char *ptr = handle->next;
288 
289  return (void*)ptr;
290 }
291 
294 #define SPHLOGENTRYGETSTRUCTPTR(__handle, __struct) SPHLFlogEntryGetStructPtr(__handle, sizeof(__struct), __alignof__(__struct))
295 
315 static inline void*
317  unsigned long __size, unsigned long __align)
318 {
319  char *ptr = (char*)handle->next;
320  unsigned long len = handle->remaining;
321  unsigned long adjust = __align - 1;
322  unsigned long mask = ~adjust;
323 
324  ptr = (char*)
325  ((((unsigned long)ptr)
326  + adjust)
327  & mask);
328 
329  if ((unsigned long)ptr != (unsigned long)handle->next)
330  {
331  len -= ((unsigned long)ptr
332  - (unsigned long)handle->next);
333  }
334 
335  if (len >= __size)
336  {
337  handle->next = ptr + __size;
338  handle->remaining = len - __size;
339  } else {
340  ptr = NULL;
341  }
342  return ptr;
343 }
344 
347 #define SPHLOGENTRYALLOCSTRUCT(__handle, __struct) SPHLFlogEntryAllocStruct(__handle, sizeof(__struct), __alignof__(__struct))
348 
370 static inline void*
372  unsigned long __size, unsigned long __align)
373 {
374  char *ptr = (char*)handle->next;
375  unsigned long len = handle->remaining;
376  unsigned long adjust = __align - 1;
377  unsigned long mask = ~adjust;
378 
379  ptr = (char*)
380  ((((unsigned long)ptr)
381  + adjust)
382  & mask);
383 
384  if ((unsigned long)ptr != (unsigned long)handle->next)
385  {
386  len -= ((unsigned long)ptr
387  - (unsigned long)handle->next);
388  }
389 
390  if (len >= __size)
391  {
392  handle->next = ptr + __size;
393  handle->remaining = len - __size;
394  } else {
395  ptr = NULL;
396  }
397  return ptr;
398 }
399 
408 static inline int
410  char *value)
411 {
412  char *ptr = handle->next;
413  unsigned short int len = handle->remaining;
414  int vlen = (strlen(value) + 1);
415  int rc = 0;
416 
417  if (len >= vlen)
418  {
419  strcpy (ptr, value);
420  ptr += vlen;
421  len -= vlen;
422  handle->next = ptr;
423  handle->remaining = len;
424  } else {
425  rc = -1;
426  }
427  return rc;
428 }
429 
438 static inline int
440  char value)
441 {
442  char *ptr = handle->next;
443  unsigned short int len = handle->remaining;
444  int rc = 0;
445 
446  if (len >= sizeof(char))
447  {
448  *ptr++ = value;
449  len -= sizeof(char);
450  handle->next = (char*)ptr;
451  handle->remaining = len;
452  } else {
453  rc = -1;
454  }
455  return rc;
456 }
457 
466 static inline int
468  short int value)
469 {
470  short int *ptr = (short int*)handle->next;
471  unsigned short int len = handle->remaining;
472  int rc = 0;
473  unsigned long adjust = __alignof__(short int) -1;
474  unsigned long mask = ~adjust;
475 
476  ptr = (short int*)
477  ((((unsigned long)ptr)
478  + adjust)
479  & mask);
480 
481  if ((unsigned long)ptr != (unsigned long)handle->next)
482  {
483  len -= ((unsigned long)ptr
484  - (unsigned long)handle->next);
485  }
486 
487  if (len >= sizeof(short int))
488  {
489  *ptr++ = value;
490  len -= sizeof(short);
491  handle->next = (char*)ptr;
492  handle->remaining = len;
493  } else {
494  rc = -1;
495  }
496  return rc;
497 }
498 
507 static inline int
509  int value)
510 {
511  int *ptr = (int*)handle->next;
512  unsigned short int len = handle->remaining;
513  int rc = 0;
514 
515  ptr = (int*)(((((unsigned long)ptr))
516  + (__alignof__(int) -1))
517  & (~(__alignof__(int) -1)));
518 
519  if ((unsigned long)ptr != (unsigned long)handle->next)
520  {
521  len -= ((unsigned long)ptr
522  - (unsigned long)handle->next);
523  }
524 
525  if (len >= sizeof(int))
526  {
527  *ptr++ = value;
528  len -= sizeof(int);
529  handle->next = (char*)ptr;
530  handle->remaining = len;
531  } else {
532  rc = -1;
533  }
534  return rc;
535 }
536 
545 static inline int
547  long value)
548 {
549  long *ptr = (long*)handle->next;
550  unsigned short int len = handle->remaining;
551  int rc = 0;
552 
553  ptr = (long*)(((((unsigned long)ptr))
554  + (__alignof__(long) -1))
555  & (~(__alignof__(long) -1)));
556 
557  if ((unsigned long)ptr != (unsigned long)handle->next)
558  {
559  len -= ((unsigned long)ptr
560  - (unsigned long)handle->next);
561  }
562 
563  if (len >= sizeof(long))
564  {
565  *ptr++ = value;
566  len -= sizeof(long);
567  handle->next = (char*)ptr;
568  handle->remaining = len;
569  } else {
570  rc = -1;
571  }
572  return rc;
573 }
574 
583 static inline int
585  void *value)
586 {
587  void **ptr = (void**)handle->next;
588  unsigned short int len = handle->remaining;
589  int rc = 0;
590 
591  ptr = (void**)(((((unsigned long)ptr))
592  + (__alignof__(void*) -1))
593  & (~(__alignof__(void*) -1)));
594 
595  if ((unsigned long)ptr != (unsigned long)handle->next)
596  {
597  len -= ((unsigned long)ptr
598  - (unsigned long)handle->next);
599  }
600 
601  if (len >= sizeof(void*))
602  {
603  *ptr++ = value;
604  len -= sizeof(void*);
605  handle->next = (char*)ptr;
606  handle->remaining = len;
607  } else {
608  rc = -1;
609  }
610  return rc;
611 }
612 
621 static inline int
623  long long value)
624 {
625  long long *ptr = (long long*)handle->next;
626  unsigned short int len = handle->remaining;
627  int rc = 0;
628 
629  ptr = (long long*)(((((unsigned long)ptr))
630  + (__alignof__(long long) -1))
631  & (~(__alignof__(long long) -1)));
632 
633  if ((unsigned long)ptr != (unsigned long)handle->next)
634  {
635  len -= ((unsigned long)ptr
636  - (unsigned long)handle->next);
637  }
638 
639  if (len >= sizeof(long long))
640  {
641  *ptr++ = value;
642  len -= sizeof(long long);
643  handle->next = (char*)ptr;
644  handle->remaining = len;
645  } else {
646  rc = -1;
647  }
648  return rc;
649 }
650 
659 static inline int
661  float value)
662 {
663  float *ptr = (float*)handle->next;
664  unsigned short int len = handle->remaining;
665  int rc = 0;
666 
667  ptr = (float*)(((((unsigned long)ptr))
668  + (__alignof__(float) -1))
669  & (~(__alignof__(float) -1)));
670 
671  if ((unsigned long)ptr != (unsigned long)handle->next)
672  {
673  len -= ((unsigned long)ptr
674  - (unsigned long)handle->next);
675  }
676 
677  if (len >= sizeof(float))
678  {
679  *ptr++ = value;
680  len -= sizeof(float);
681  handle->next = (char*)ptr;
682  handle->remaining = len;
683  } else {
684  rc = -1;
685  }
686  return rc;
687 }
688 
697 static inline int
699  double value)
700 {
701  double *ptr = (double*)handle->next;
702  unsigned short int len = handle->remaining;
703  int rc = 0;
704 
705  ptr = (double*)(((((unsigned long)ptr))
706  + (__alignof__(double) -1))
707  & (~(__alignof__(double) -1)));
708 
709  if ((unsigned long)ptr != (unsigned long)handle->next)
710  {
711  len -= ((unsigned long)ptr
712  - (unsigned long)handle->next);
713  }
714 
715  if (len >= sizeof(double))
716  {
717  *ptr++ = value;
718  len -= sizeof(double);
719  handle->next = (char*)ptr;
720  handle->remaining = len;
721  } else {
722  rc = -1;
723  }
724  return rc;
725 }
726 
735 static inline char
737 {
738  char *ptr = handle->next;
739  unsigned short int len = handle->remaining;
740  char value = 0;
741 
742  if (len >= sizeof(char))
743  {
744  value = *ptr++;
745  len -= sizeof(char);
746  handle->next = (char*)ptr;
747  handle->remaining = len;
748  }
749  return value;
750 }
751 
760 static inline char*
762 {
763  char *ptr = handle->next;
764  unsigned short int len = handle->remaining;
765  int vlen = (strlen(ptr) + 1);
766  char *value = 0;
767 
768  if (len >= vlen)
769  {
770  value = ptr;
771  ptr += vlen;
772  len -= vlen;
773  handle->next = ptr;
774  handle->remaining = len;
775  }
776  return value;
777 }
778 
788 static inline short int
790 {
791  short int *ptr = (short int*)handle->next;
792  unsigned short int len = handle->remaining;
793  unsigned long adjust = __alignof__(short int) -1;
794  unsigned long mask = ~adjust;
795  short int value = 0;
796 
797  ptr = (short int*)
798  ((((unsigned long)ptr)
799  + adjust)
800  & mask);
801 
802  if ((unsigned long)ptr != (unsigned long)handle->next)
803  {
804  len -= ((unsigned long)ptr
805  - (unsigned long)handle->next);
806  }
807 
808  if (len >= sizeof(short int))
809  {
810  value = *ptr++;
811  len -= sizeof(short);
812  handle->next = (char*)ptr;
813  handle->remaining = len;
814  }
815  return value;
816 }
817 
827 static inline int
829 {
830  int *ptr = (int*)handle->next;
831  unsigned short int len = handle->remaining;
832  int value = 0;
833 
834  ptr = (int*)(((((unsigned long)ptr))
835  + (__alignof__(int) -1))
836  & (~(__alignof__(int) -1)));
837 
838  if ((unsigned long)ptr != (unsigned long)handle->next)
839  {
840  len -= ((unsigned long)ptr
841  - (unsigned long)handle->next);
842  }
843 
844  if (len >= sizeof(int))
845  {
846  value = *ptr++;
847  len -= sizeof(int);
848  handle->next = (char*)ptr;
849  handle->remaining = len;
850  }
851  return value;
852 }
853 
863 static inline long
865 {
866  long *ptr = (long*)handle->next;
867  unsigned short int len = handle->remaining;
868  long value = 0;
869 
870  ptr = (long*)(((((unsigned long)ptr))
871  + (__alignof__(long) -1))
872  & (~(__alignof__(long) -1)));
873 
874  if ((unsigned long)ptr != (unsigned long)handle->next)
875  {
876  len -= ((unsigned long)ptr
877  - (unsigned long)handle->next);
878  }
879 
880  if (len >= sizeof(long))
881  {
882  value = *ptr++;
883  len -= sizeof(long);
884  handle->next = (char*)ptr;
885  handle->remaining = len;
886  }
887  return value;
888 }
889 
899 static inline void*
901 {
902  void **ptr = (void**)handle->next;
903  unsigned short int len = handle->remaining;
904  void *value = NULL;
905 
906  ptr = (void**)(((((unsigned long)ptr))
907  + (__alignof__(void*) -1))
908  & (~(__alignof__(void*) -1)));
909 
910  if ((unsigned long)ptr != (unsigned long)handle->next)
911  {
912  len -= ((unsigned long)ptr
913  - (unsigned long)handle->next);
914  }
915 
916  if (len >= sizeof(void*))
917  {
918  value = *ptr++;
919  len -= sizeof(void*);
920  handle->next = (char*)ptr;
921  handle->remaining = len;
922  }
923  return value;
924 }
925 
935 static inline long long
937 {
938  long long *ptr = (long long*)handle->next;
939  unsigned short int len = handle->remaining;
940  long long value = 0LL;
941 
942  ptr = (long long*)(((((unsigned long)ptr))
943  + (__alignof__(long long) -1))
944  & (~(__alignof__(long long) -1)));
945 
946  if ((unsigned long)ptr != (unsigned long)handle->next)
947  {
948  len -= ((unsigned long)ptr
949  - (unsigned long)handle->next);
950  }
951 
952  if (len >= sizeof(long long))
953  {
954  value = *ptr++;
955  len -= sizeof(long long);
956  handle->next = (char*)ptr;
957  handle->remaining = len;
958  }
959  return value;
960 }
961 
971 static inline float
973 {
974  float *ptr = (float*)handle->next;
975  unsigned short int len = handle->remaining;
976  float value = 0.0;
977 
978  ptr = (float*)(((((unsigned long)ptr))
979  + (__alignof__(float) -1))
980  & (~(__alignof__(float) -1)));
981 
982  if ((unsigned long)ptr != (unsigned long)handle->next)
983  {
984  len -= ((unsigned long)ptr
985  - (unsigned long)handle->next);
986  }
987 
988  if (len >= sizeof(float))
989  {
990  value = *ptr++;
991  len -= sizeof(float);
992  handle->next = (char*)ptr;
993  handle->remaining = len;
994  }
995  return value;
996 }
997 
1007 static inline double
1009 {
1010  double *ptr = (double*)handle->next;
1011  unsigned short int len = handle->remaining;
1012  double value = 0.0;
1013 
1014  ptr = (double*)(((((unsigned long)ptr))
1015  + (__alignof__(double) -1))
1016  & (~(__alignof__(double) -1)));
1017 
1018  if ((unsigned long)ptr != (unsigned long)handle->next)
1019  {
1020  len -= ((unsigned long)ptr
1021  - (unsigned long)handle->next);
1022  }
1023 
1024  if (len >= sizeof(double))
1025  {
1026  value = *ptr++;
1027  len -= sizeof(double);
1028  handle->next = (char*)ptr;
1029  handle->remaining = len;
1030  }
1031  return value;
1032 }
1033 
1034 #endif /* __SPH_LOCK_FREE_LOGENTRY_H */
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
static int SPHLFLogEntryIsComplete(SPHLFLoggerHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition: sphlflogentry.h:132
static int SPHLFLogEntrySubcat(SPHLFLoggerHandle_t *handlespace)
Return the entry sub-category for the entry specified by the entry handle.
Definition: sphlflogentry.h:255
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
#define sas_write_barrier()
Definition: sasatom.h:51
char * next
Definition: sphlflogger.h:248
unsigned short int remaining
Definition: sphlflogger.h:252
unsigned int subcat
Definition: sphlflogger.h:198
static long long SPHLFlogEntryGetNextLongLong(SPHLFLoggerHandle_t *handle)
Return the next long long int from the logger entry via the current next value pointer. Leading bytes may be skipped to get the required alignment. The internal next value pointer is advanced to the next location.
Definition: sphlflogentry.h:936
static sphtimer_t SPHLFLogEntryTimeStamp(SPHLFLoggerHandle_t *handlespace)
Return the time stamp value for the entry specified by the entry handle.
Definition: sphlflogentry.h:160
static sphpid16_t SPHLFLogEntryPID(SPHLFLoggerHandle_t *handlespace)
Return the process ID for the entry specified by the entry handle.
Definition: sphlflogentry.h:179
unsigned long long int sphtimer_t
Value from TB/TSC register (64-bits on all platforms).
Definition: sphtimer.h:66
sphLogEntryLayout_t detail
Definition: sphlflogger.h:212
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
static sphpid16_t SPHLFLogEntryTID(SPHLFLoggerHandle_t *handlespace)
Return the thread ID for the entry specified by the entry handle.
Definition: sphlflogentry.h:198
Type and functions for SAS atomic operations.
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
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
Shared Persistent Heap, logger. For shared memory multi-thread/multi-core applications. This implementation uses atomic operations to implement Lock Free Loggers (SPHLFLogger_t).
static void * SPHLFLogEntryGetFreePtr(SPHLFLoggerHandle_t *handle)
Return the address first free byte for the entry specified by the entry handle.
Definition: sphlflogentry.h:285
static short int SPHLFlogEntryGetNextShort(SPHLFLoggerHandle_t *handle)
Return the next short int from the logger entry via the current next value pointer. Leading bytes may be skipped to get the required alignment. The internal next value pointer is advanced to the next location.
Definition: sphlflogentry.h:789
Union of Entry details with 32-bit word for atomic update.
Definition: sphlflogger.h:208
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
unsigned int timestamped
Definition: sphlflogger.h:192
static int SPHLFlogEntryAddPtr(SPHLFLoggerHandle_t *handle, void *value)
Insert a void* at the next free location within the logger entry.
Definition: sphlflogentry.h:584
Instance of a Lock Free Logger Entry Handle.
Definition: sphlflogger.h:244
unsigned short sphpid16_t
Common type for PID/TID values stored in Logger entries.
Definition: sphlflogger.h:217
static int SPHLFLogEntryIsTimestamped(SPHLFLoggerHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition: sphlflogentry.h:145
static int SPHLFlogEntryAddChar(SPHLFLoggerHandle_t *handle, char value)
Insert a character at the next free location within the logger entry.
Definition: sphlflogentry.h:439
static int SPHLFlogEntryAddDouble(SPHLFLoggerHandle_t *handle, double value)
Insert a double at the next free location within the logger entry.
Definition: sphlflogentry.h:698
static SPHLFLogHeader_t * SPHLFLogEntryHeader(SPHLFLoggerHandle_t *handlespace)
Return the address for the entry header specified by the entry handle.
Definition: sphlflogentry.h:217
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
unsigned int category
Definition: sphlflogger.h:196
#define sas_read_barrier()
Definition: sasatom.h:56
unsigned int valid
Definition: sphlflogger.h:190
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
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
sphLogEntryID_t idUnit
Definition: sphlflogger.h:210
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
static long SPHLFlogEntryGetNextLong(SPHLFLoggerHandle_t *handle)
Return the next long int from the logger entry via the current next value pointer. Leading bytes may be skipped to get the required alignment. The internal next value pointer is advanced to the next location.
Definition: sphlflogentry.h:864
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
sphtimer_t timeStamp
Definition: sphlflogger.h:231
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
sphLogEntry_t entryID
Definition: sphlflogger.h:225
sphpid16_t PID
Definition: sphlflogger.h:227
SPHLFLogHeader_t * entry
Definition: sphlflogger.h:246
static int SPHLFlogEntryAddInt(SPHLFLoggerHandle_t *handle, int value)
Insert a int at the next free location within the logger entry.
Definition: sphlflogentry.h:508
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
sphpid16_t TID
Definition: sphlflogger.h:229
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
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
static int SPHLFlogEntryAddFloat(SPHLFLoggerHandle_t *handle, float value)
Insert a float at the next free location within the logger entry.
Definition: sphlflogentry.h:660
static int SPHLFLogEntryCategory(SPHLFLoggerHandle_t *handlespace)
Return the entry category for the entry specified by the entry handle.
Definition: sphlflogentry.h:234
Instance of a Lock Free Logger Entry Header.
Definition: sphlflogger.h:223