Shared Persistent Heap Data Environment Manual  1.1.0
sphlfentry.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2015 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_ENTRY_H
13 #define __SPH_LOCK_FREE_ENTRY_H
14 
49 #include <string.h>
50 #include "sastype.h"
51 #include "sasatom.h"
52 #include "sphtimer.h"
53 
55 typedef unsigned long longPtr_t;
56 
59 typedef struct {
61  unsigned int valid : 1;
63  unsigned int timestamped : 1;
65  unsigned int allocated : 1;
67  unsigned int __reserved : 1;
69  unsigned int category : 12;
71  unsigned int subcat : 8;
73  unsigned int len : 8;
75 
77 typedef unsigned int sphLFEntryID_t;
78 
81 typedef union {
86  } sphLFEntry_t;
87 
89 typedef unsigned short sphpid16_t;
90 
95 typedef struct {
105 
115 typedef struct {
119  char *next;
121  unsigned short int total_size;
123  unsigned short int remaining;
125 
134 static inline int
136 {
137  int rc = 0;
138  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
139  sphLFEntry_t entrytemp;
140 
142  entrytemp.idUnit = entryPtr->entryID.idUnit;
143  entrytemp.detail.valid = 1;
144  entryPtr->entryID.idUnit = entrytemp.idUnit;
145 
146  return rc;
147 }
148 
157 static inline int
159 {
160  int rc = 0;
161  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
162  sphLFEntry_t entrytemp;
163 
164  entrytemp.idUnit = entryPtr->entryID.idUnit;
165  entrytemp.detail.valid = 1;
166  entryPtr->entryID.idUnit = entrytemp.idUnit;
167 
168  return rc;
169 }
170 
178 static inline int
180 {
181  int rc = 0;
182  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
183  sphLFEntry_t entrytemp;
184 
186  entrytemp.idUnit = entryPtr->entryID.idUnit;
187  entrytemp.detail.valid = 1;
188  entryPtr->entryID.idUnit = entrytemp.idUnit;
189 
190  return rc;
191 }
192 
199 static inline int
201 {
202  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
203 
204  return (entryPtr->entryID.detail.valid == 1);
205 }
206 
212 static inline int
214 {
215  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
216 
217  return ((entryPtr->entryID.detail.valid == 1)
218  &&(entryPtr->entryID.detail.timestamped == 1));
219 }
220 
227 static inline sphtimer_t
229 {
230  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
231  sphtimer_t result = 0;
232 
233  if ((entryPtr->entryID.detail.valid == 1)
234  &&(entryPtr->entryID.detail.timestamped == 1))
235  result = entryPtr->timeStamp;
236 
237  return result;
238 }
239 
246 static inline sphpid16_t
248 {
249  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
250  sphpid16_t result = 0;
251 
252  if ((entryPtr->entryID.detail.valid == 1)
253  &&(entryPtr->entryID.detail.timestamped == 1))
254  result = entryPtr->PID;
255 
256  return result;
257 }
258 
265 static inline sphpid16_t
267 {
268  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
269  sphpid16_t result = 0;
270 
271  if ((entryPtr->entryID.detail.valid == 1)
272  &&(entryPtr->entryID.detail.timestamped == 1))
273  result = entryPtr->TID;
274 
275  return result;
276 }
277 
284 static inline SPHLFEntryHeader_t*
286 {
287  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
288 
289  if (entryPtr->entryID.detail.valid != 1)
290  entryPtr = NULL;
291 
292  return entryPtr;
293 }
294 
301 static inline int
303 {
304  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
305  int result = -1;
306 #if 0
307  printf ("SPHLFEntryCategory(%p) entry=%p id=%x\n",
308  handlespace, entryPtr, entryPtr->entryID.idUnit);
309 #endif
310  if (entryPtr->entryID.detail.valid == 1)
311  result = entryPtr->entryID.detail.category;
312 
313  return result;
314 }
315 
322 static inline int
324 {
325  SPHLFEntryHeader_t *entryPtr = handlespace->entry;
326  int result = -1;
327 #if 0
328  printf ("SPHLFEntrySubcat(%p) entry=%p id=%x\n",
329  handlespace, entryPtr, entryPtr->entryID.idUnit);
330 #endif
331  if (entryPtr->entryID.detail.valid == 1)
332  result = entryPtr->entryID.detail.subcat;
333 
334  return result;
335 }
336 
352 static inline void*
354 {
355  char *ptr = handle->next;
356 
357  return (void*)ptr;
358 }
359 
362 #define SPHENTRYGETSTRUCTPTR(__handle, __struct) SPHLFEntryGetStructPtr(__handle, sizeof(__struct), __alignof__(__struct))
363 
383 static inline void*
385  unsigned long __size, unsigned long __align)
386 {
387  char *ptr = (char*)handle->next;
388  unsigned long len = handle->remaining;
389  unsigned long adjust = __align - 1;
390  unsigned long mask = ~adjust;
391 
392  ptr = (char*)
393  ((((unsigned long)ptr)
394  + adjust)
395  & mask);
396 
397  if ((unsigned long)ptr != (unsigned long)handle->next)
398  {
399  len -= ((unsigned long)ptr
400  - (unsigned long)handle->next);
401  }
402 
403  if (len >= __size)
404  {
405  handle->next = ptr + __size;
406  handle->remaining = len - __size;
407  } else {
408  ptr = NULL;
409  }
410  return ptr;
411 }
412 
415 #define SPHENTRYALLOCSTRUCT(__handle, __struct) SPHLFEntryAllocStruct(__handle, sizeof(__struct), __alignof__(__struct))
416 
438 static inline void*
440  unsigned long __size, unsigned long __align)
441 {
442  char *ptr = (char*)handle->next;
443  unsigned long len = handle->remaining;
444  unsigned long adjust = __align - 1;
445  unsigned long mask = ~adjust;
446 
447  ptr = (char*)
448  ((((unsigned long)ptr)
449  + adjust)
450  & mask);
451 
452  if ((unsigned long)ptr != (unsigned long)handle->next)
453  {
454  len -= ((unsigned long)ptr
455  - (unsigned long)handle->next);
456  }
457 
458  if (len >= __size)
459  {
460  handle->next = ptr + __size;
461  handle->remaining = len - __size;
462  } else {
463  ptr = NULL;
464  }
465  return ptr;
466 }
467 
476 static inline int
478  char *value)
479 {
480  char *ptr = handle->next;
481  unsigned short int len = handle->remaining;
482  int vlen = (strlen(value) + 1);
483  int rc = 0;
484 
485  if (len >= vlen)
486  {
487  strcpy (ptr, value);
488  ptr += vlen;
489  len -= vlen;
490  handle->next = ptr;
491  handle->remaining = len;
492  } else {
493  rc = -1;
494  }
495  return rc;
496 }
497 
506 static inline int
508  char value)
509 {
510  char *ptr = handle->next;
511  unsigned short int len = handle->remaining;
512  int rc = 0;
513 
514  if (len >= sizeof(char))
515  {
516  *ptr++ = value;
517  len -= sizeof(char);
518  handle->next = (char*)ptr;
519  handle->remaining = len;
520  } else {
521  rc = -1;
522  }
523  return rc;
524 }
525 
534 static inline int
536  short int value)
537 {
538  short int *ptr = (short int*)handle->next;
539  unsigned short int len = handle->remaining;
540  int rc = 0;
541  unsigned long adjust = __alignof__(short int) -1;
542  unsigned long mask = ~adjust;
543 
544  ptr = (short int*)
545  ((((unsigned long)ptr)
546  + adjust)
547  & mask);
548 
549  if ((unsigned long)ptr != (unsigned long)handle->next)
550  {
551  len -= ((unsigned long)ptr
552  - (unsigned long)handle->next);
553  }
554 
555  if (len >= sizeof(short int))
556  {
557  *ptr++ = value;
558  len -= sizeof(short);
559  handle->next = (char*)ptr;
560  handle->remaining = len;
561  } else {
562  rc = -1;
563  }
564  return rc;
565 }
566 
575 static inline int
577  int value)
578 {
579  int *ptr = (int*)handle->next;
580  unsigned short int len = handle->remaining;
581  int rc = 0;
582 
583  ptr = (int*)(((((unsigned long)ptr))
584  + (__alignof__(int) -1))
585  & (~(__alignof__(int) -1)));
586 
587  if ((unsigned long)ptr != (unsigned long)handle->next)
588  {
589  len -= ((unsigned long)ptr
590  - (unsigned long)handle->next);
591  }
592 
593  if (len >= sizeof(int))
594  {
595  *ptr++ = value;
596  len -= sizeof(int);
597  handle->next = (char*)ptr;
598  handle->remaining = len;
599  } else {
600  rc = -1;
601  }
602  return rc;
603 }
604 
613 static inline int
615  long value)
616 {
617  long *ptr = (long*)handle->next;
618  unsigned short int len = handle->remaining;
619  int rc = 0;
620 
621  ptr = (long*)(((((unsigned long)ptr))
622  + (__alignof__(long) -1))
623  & (~(__alignof__(long) -1)));
624 
625  if ((unsigned long)ptr != (unsigned long)handle->next)
626  {
627  len -= ((unsigned long)ptr
628  - (unsigned long)handle->next);
629  }
630 
631  if (len >= sizeof(long))
632  {
633  *ptr++ = value;
634  len -= sizeof(long);
635  handle->next = (char*)ptr;
636  handle->remaining = len;
637  } else {
638  rc = -1;
639  }
640  return rc;
641 }
642 
651 static inline int
653  void *value)
654 {
655  void **ptr = (void**)handle->next;
656  unsigned short int len = handle->remaining;
657  int rc = 0;
658 
659  ptr = (void**)(((((unsigned long)ptr))
660  + (__alignof__(void*) -1))
661  & (~(__alignof__(void*) -1)));
662 
663  if ((unsigned long)ptr != (unsigned long)handle->next)
664  {
665  len -= ((unsigned long)ptr
666  - (unsigned long)handle->next);
667  }
668 
669  if (len >= sizeof(void*))
670  {
671  *ptr++ = value;
672  len -= sizeof(void*);
673  handle->next = (char*)ptr;
674  handle->remaining = len;
675  } else {
676  rc = -1;
677  }
678  return rc;
679 }
680 
689 static inline int
691  long long value)
692 {
693  long long *ptr = (long long*)handle->next;
694  unsigned short int len = handle->remaining;
695  int rc = 0;
696 
697  ptr = (long long*)(((((unsigned long)ptr))
698  + (__alignof__(long long) -1))
699  & (~(__alignof__(long long) -1)));
700 
701  if ((unsigned long)ptr != (unsigned long)handle->next)
702  {
703  len -= ((unsigned long)ptr
704  - (unsigned long)handle->next);
705  }
706 
707  if (len >= sizeof(long long))
708  {
709  *ptr++ = value;
710  len -= sizeof(long long);
711  handle->next = (char*)ptr;
712  handle->remaining = len;
713  } else {
714  rc = -1;
715  }
716  return rc;
717 }
718 
727 static inline int
729  float value)
730 {
731  float *ptr = (float*)handle->next;
732  unsigned short int len = handle->remaining;
733  int rc = 0;
734 
735  ptr = (float*)(((((unsigned long)ptr))
736  + (__alignof__(float) -1))
737  & (~(__alignof__(float) -1)));
738 
739  if ((unsigned long)ptr != (unsigned long)handle->next)
740  {
741  len -= ((unsigned long)ptr
742  - (unsigned long)handle->next);
743  }
744 
745  if (len >= sizeof(float))
746  {
747  *ptr++ = value;
748  len -= sizeof(float);
749  handle->next = (char*)ptr;
750  handle->remaining = len;
751  } else {
752  rc = -1;
753  }
754  return rc;
755 }
756 
765 static inline int
767  double value)
768 {
769  double *ptr = (double*)handle->next;
770  unsigned short int len = handle->remaining;
771  int rc = 0;
772 
773  ptr = (double*)(((((unsigned long)ptr))
774  + (__alignof__(double) -1))
775  & (~(__alignof__(double) -1)));
776 
777  if ((unsigned long)ptr != (unsigned long)handle->next)
778  {
779  len -= ((unsigned long)ptr
780  - (unsigned long)handle->next);
781  }
782 
783  if (len >= sizeof(double))
784  {
785  *ptr++ = value;
786  len -= sizeof(double);
787  handle->next = (char*)ptr;
788  handle->remaining = len;
789  } else {
790  rc = -1;
791  }
792  return rc;
793 }
794 
803 static inline char
805 {
806  char *ptr = handle->next;
807  unsigned short int len = handle->remaining;
808  char value = 0;
809 
810  if (len >= sizeof(char))
811  {
812  value = *ptr++;
813  len -= sizeof(char);
814  handle->next = (char*)ptr;
815  handle->remaining = len;
816  }
817  return value;
818 }
819 
828 static inline char*
830 {
831  char *ptr = handle->next;
832  unsigned short int len = handle->remaining;
833  int vlen = (strlen(ptr) + 1);
834  char *value = 0;
835 
836  if (len >= vlen)
837  {
838  value = ptr;
839  ptr += vlen;
840  len -= vlen;
841  handle->next = ptr;
842  handle->remaining = len;
843  }
844  return value;
845 }
846 
856 static inline short int
858 {
859  short int *ptr = (short int*)handle->next;
860  unsigned short int len = handle->remaining;
861  unsigned long adjust = __alignof__(short int) -1;
862  unsigned long mask = ~adjust;
863  short int value = 0;
864 
865  ptr = (short int*)
866  ((((unsigned long)ptr)
867  + adjust)
868  & mask);
869 
870  if ((unsigned long)ptr != (unsigned long)handle->next)
871  {
872  len -= ((unsigned long)ptr
873  - (unsigned long)handle->next);
874  }
875 
876  if (len >= sizeof(short int))
877  {
878  value = *ptr++;
879  len -= sizeof(short);
880  handle->next = (char*)ptr;
881  handle->remaining = len;
882  }
883  return value;
884 }
885 
895 static inline int
897 {
898  int *ptr = (int*)handle->next;
899  unsigned short int len = handle->remaining;
900  int value = 0;
901 
902  ptr = (int*)(((((unsigned long)ptr))
903  + (__alignof__(int) -1))
904  & (~(__alignof__(int) -1)));
905 
906  if ((unsigned long)ptr != (unsigned long)handle->next)
907  {
908  len -= ((unsigned long)ptr
909  - (unsigned long)handle->next);
910  }
911 
912  if (len >= sizeof(int))
913  {
914  value = *ptr++;
915  len -= sizeof(int);
916  handle->next = (char*)ptr;
917  handle->remaining = len;
918  }
919  return value;
920 }
921 
931 static inline long
933 {
934  long *ptr = (long*)handle->next;
935  unsigned short int len = handle->remaining;
936  long value = 0;
937 
938  ptr = (long*)(((((unsigned long)ptr))
939  + (__alignof__(long) -1))
940  & (~(__alignof__(long) -1)));
941 
942  if ((unsigned long)ptr != (unsigned long)handle->next)
943  {
944  len -= ((unsigned long)ptr
945  - (unsigned long)handle->next);
946  }
947 
948  if (len >= sizeof(long))
949  {
950  value = *ptr++;
951  len -= sizeof(long);
952  handle->next = (char*)ptr;
953  handle->remaining = len;
954  }
955  return value;
956 }
957 
967 static inline void*
969 {
970  void **ptr = (void**)handle->next;
971  unsigned short int len = handle->remaining;
972  void *value = NULL;
973 
974  ptr = (void**)(((((unsigned long)ptr))
975  + (__alignof__(void*) -1))
976  & (~(__alignof__(void*) -1)));
977 
978  if ((unsigned long)ptr != (unsigned long)handle->next)
979  {
980  len -= ((unsigned long)ptr
981  - (unsigned long)handle->next);
982  }
983 
984  if (len >= sizeof(void*))
985  {
986  value = *ptr++;
987  len -= sizeof(void*);
988  handle->next = (char*)ptr;
989  handle->remaining = len;
990  }
991  return value;
992 }
993 
1003 static inline long long
1005 {
1006  long long *ptr = (long long*)handle->next;
1007  unsigned short int len = handle->remaining;
1008  long long value = 0LL;
1009 
1010  ptr = (long long*)(((((unsigned long)ptr))
1011  + (__alignof__(long long) -1))
1012  & (~(__alignof__(long long) -1)));
1013 
1014  if ((unsigned long)ptr != (unsigned long)handle->next)
1015  {
1016  len -= ((unsigned long)ptr
1017  - (unsigned long)handle->next);
1018  }
1019 
1020  if (len >= sizeof(long long))
1021  {
1022  value = *ptr++;
1023  len -= sizeof(long long);
1024  handle->next = (char*)ptr;
1025  handle->remaining = len;
1026  }
1027  return value;
1028 }
1029 
1039 static inline float
1041 {
1042  float *ptr = (float*)handle->next;
1043  unsigned short int len = handle->remaining;
1044  float value = 0.0;
1045 
1046  ptr = (float*)(((((unsigned long)ptr))
1047  + (__alignof__(float) -1))
1048  & (~(__alignof__(float) -1)));
1049 
1050  if ((unsigned long)ptr != (unsigned long)handle->next)
1051  {
1052  len -= ((unsigned long)ptr
1053  - (unsigned long)handle->next);
1054  }
1055 
1056  if (len >= sizeof(float))
1057  {
1058  value = *ptr++;
1059  len -= sizeof(float);
1060  handle->next = (char*)ptr;
1061  handle->remaining = len;
1062  }
1063  return value;
1064 }
1065 
1075 static inline double
1077 {
1078  double *ptr = (double*)handle->next;
1079  unsigned short int len = handle->remaining;
1080  double value = 0.0;
1081 
1082  ptr = (double*)(((((unsigned long)ptr))
1083  + (__alignof__(double) -1))
1084  & (~(__alignof__(double) -1)));
1085 
1086  if ((unsigned long)ptr != (unsigned long)handle->next)
1087  {
1088  len -= ((unsigned long)ptr
1089  - (unsigned long)handle->next);
1090  }
1091 
1092  if (len >= sizeof(double))
1093  {
1094  value = *ptr++;
1095  len -= sizeof(double);
1096  handle->next = (char*)ptr;
1097  handle->remaining = len;
1098  }
1099  return value;
1100 }
1101 
1102 #endif /* __SPH_LOCK_FREE_ENTRY_H */
static double SPHLFEntryGetNextDouble(SPHLFEntryHandle_t *handle)
Return the next double from the entry via the current next value pointer. Leading bytes may be skippe...
Definition: sphlfentry.h:1076
Instance of a Lock Free Entry Header.
Definition: sphlfentry.h:95
static long long SPHLFEntryGetNextLongLong(SPHLFEntryHandle_t *handle)
Return the next long long int from the entry via the current next value pointer. Leading bytes may be...
Definition: sphlfentry.h:1004
sphpid16_t TID
Definition: sphlfentry.h:101
static int SPHLFEntryStrongComplete(SPHLFEntryHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. Also executes any memory barriers required...
Definition: sphlfentry.h:135
#define sas_write_barrier()
Definition: sasatom.h:51
static void * SPHLFEntryGetFreePtr(SPHLFEntryHandle_t *handle)
Return the first free byte address for the entry specified by the entry handle.
Definition: sphlfentry.h:353
sphtimer_t timeStamp
Definition: sphlfentry.h:103
static int SPHLFEntryIsTimestamped(SPHLFEntryHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition: sphlfentry.h:213
unsigned long longPtr_t
unsigned int type, consistent with the size of a pointer and used for pointer calculations ...
Definition: sphlfentry.h:55
Functions to access the Time Base register (PPC) or clock_gettime(CLOCK_MONOTONIC) measure time at hi...
unsigned long long int sphtimer_t
Value from TB/TSC register (64-bits on all platforms).
Definition: sphtimer.h:66
sphLFEntryID_t idUnit
Definition: sphlfentry.h:83
static int SPHLFEntryWeakComplete(SPHLFEntryHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. No memory barriers are performance...
Definition: sphlfentry.h:158
unsigned short sphpid16_t
Common type for PID/TID values stored in event entries.
Definition: sphlfentry.h:89
Type and functions for SAS atomic operations.
Instance of a Lock Free event data Entry Handle.
Definition: sphlfentry.h:115
static void * SPHLFEntryGetNextPtr(SPHLFEntryHandle_t *handle)
Return the next void* from the entry via the current next value pointer. Leading bytes may be skipped...
Definition: sphlfentry.h:968
unsigned short int total_size
Definition: sphlfentry.h:121
static int SPHLFEntryGetNextInt(SPHLFEntryHandle_t *handle)
Return the next int from the entry via the current next value pointer. Leading bytes may be skipped t...
Definition: sphlfentry.h:896
static void * SPHLFEntryGetStructPtr(SPHLFEntryHandle_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: sphlfentry.h:384
static long SPHLFEntryGetNextLong(SPHLFEntryHandle_t *handle)
Return the next long int from the entry via the current next value pointer. Leading bytes may be skip...
Definition: sphlfentry.h:932
static int SPHLFEntryAddInt(SPHLFEntryHandle_t *handle, int value)
Insert a int at the next free location within the entry.
Definition: sphlfentry.h:576
sphLFEntry_t entryID
Definition: sphlfentry.h:97
static SPHLFEntryHeader_t * SPHLFEntryHeader(SPHLFEntryHandle_t *handlespace)
Return the address for the entry header specified by the entry handle.
Definition: sphlfentry.h:285
sphpid16_t PID
Definition: sphlfentry.h:99
Fields defining the entry header details word.
Definition: sphlfentry.h:59
SPHLFEntryHeader_t * entry
Definition: sphlfentry.h:117
static int SPHLFEntryCategory(SPHLFEntryHandle_t *handlespace)
Return the entry category for the entry specified by the entry handle.
Definition: sphlfentry.h:302
static int SPHLFEntryAddLong(SPHLFEntryHandle_t *handle, long value)
Insert a long int at the next free location within the entry.
Definition: sphlfentry.h:614
unsigned short sphpid16_t
Common type for PID/TID values stored in Logger entries.
Definition: sphlflogger.h:217
unsigned int timestamped
Definition: sphlfentry.h:63
static int SPHLFEntryAddFloat(SPHLFEntryHandle_t *handle, float value)
Insert a float at the next free location within the entry.
Definition: sphlfentry.h:728
static int SPHLFEntryComplete(SPHLFEntryHandle_t *handlespace)
Marks the entry specified by the entry handle as complete. Also executes write memory barries require...
Definition: sphlfentry.h:179
static short int SPHLFEntryGetNextShort(SPHLFEntryHandle_t *handle)
Return the next short int from the entry via the current next value pointer. Leading bytes may be ski...
Definition: sphlfentry.h:857
char * next
Definition: sphlfentry.h:119
static int SPHLFEntryAddDouble(SPHLFEntryHandle_t *handle, double value)
Insert a double at the next free location within the entry.
Definition: sphlfentry.h:766
static void * SPHLFEntryAllocStruct(SPHLFEntryHandle_t *handle, unsigned long __size, unsigned long __align)
Allocate space for struct starting at the next free location within the entry.
Definition: sphlfentry.h:439
static int SPHLFEntryAddShort(SPHLFEntryHandle_t *handle, short int value)
Insert a short int at the next free location within the entry.
Definition: sphlfentry.h:535
static sphpid16_t SPHLFEntryTID(SPHLFEntryHandle_t *handlespace)
Return the thread ID for the entry specified by the entry handle.
Definition: sphlfentry.h:266
#define sas_read_barrier()
Definition: sasatom.h:56
static int SPHLFEntrySubcat(SPHLFEntryHandle_t *handlespace)
Return the entry sub-category for the entry specified by the entry handle.
Definition: sphlfentry.h:323
sphLFEntryLayout_t detail
Definition: sphlfentry.h:85
static float SPHLFEntryGetNextFloat(SPHLFEntryHandle_t *handle)
Return the next float from the entry via the current next value pointer. Leading bytes may be skipped...
Definition: sphlfentry.h:1040
static int SPHLFEntryAddChar(SPHLFEntryHandle_t *handle, char value)
Insert a character at the next free location within the entry.
Definition: sphlfentry.h:507
static int SPHLFEntryIsComplete(SPHLFEntryHandle_t *handlespace)
Return the status of the entry specified by the entry handle.
Definition: sphlfentry.h:200
unsigned int sphLFEntryID_t
Aggregate type for handling sphLogEntryLayout_t.
Definition: sphlfentry.h:77
static int SPHLFEntryAddPtr(SPHLFEntryHandle_t *handle, void *value)
Insert a void* at the next free location within the entry.
Definition: sphlfentry.h:652
static char * SPHLFEntryGetNextString(SPHLFEntryHandle_t *handle)
Return the pointer to the next C string from the logger entry via the current next value pointer...
Definition: sphlfentry.h:829
Union of Entry details with 32-bit word for atomic update.
Definition: sphlfentry.h:81
static int SPHLFEntryAddLongLong(SPHLFEntryHandle_t *handle, long long value)
Insert a long long int at the next free location within the entry.
Definition: sphlfentry.h:690
unsigned int subcat
Definition: sphlfentry.h:71
static sphpid16_t SPHLFEntryPID(SPHLFEntryHandle_t *handlespace)
Return the process ID for the entry specified by the entry handle.
Definition: sphlfentry.h:247
static int SPHLFEntryAddString(SPHLFEntryHandle_t *handle, char *value)
Insert a C string at the next free location within the entry.
Definition: sphlfentry.h:477
unsigned int category
Definition: sphlfentry.h:69
static sphtimer_t SPHLFEntryTimeStamp(SPHLFEntryHandle_t *handlespace)
Return the time stamp value for the entry specified by the entry handle.
Definition: sphlfentry.h:228
unsigned int valid
Definition: sphlfentry.h:61
unsigned short int remaining
Definition: sphlfentry.h:123
static char SPHLFEntryGetNextChar(SPHLFEntryHandle_t *handle)
Return the next char from the entry via the current next value pointer. The internal next value point...
Definition: sphlfentry.h:804