2 Aesalon, a tool to visualize a program's behaviour at run-time.
3 Copyright (C) 2010, Aesalon Development Team.
5 Aesalon is distributed under the terms of the GNU GPLv3. For more
6 licensing information, see the file LICENSE included with the distribution.
8 @file include/common/ZoneHeader.h
12 #ifndef AesalonCommon_ZoneHeader_H
13 #define AesalonCommon_ZoneHeader_H
16 #include <semaphore.h>
17 #include <sys/types.h>
19 #define ZoneDataOffset (sizeof(ZoneHeader_t) + 16)
21 typedef struct ZoneHeader_t ZoneHeader_t
;
23 /** Head element of the data region for the circular buffer. */
26 /** Tail element of the data region for the circular buffer. */
29 /** Packet semaphore: incremented when a packet is available for reading. */
30 sem_t packetSemaphore
;
32 /** Overflow value: if set to a non-zero value, then the value is how many more bytes are
33 required before the next packet can be written. When this value reaches < 0, @a overflowSemaphore
34 should be incremented.
38 /** The overflow semaphore, see @a overflow for description. */
39 sem_t overflowSemaphore
;
41 /** The size of the end-gap. This is used when a size larger than the remaining space on the end of the
42 circular buffer is required.
44 A zero value indicates either the absence of a gap or the absence of a packet in that region of memory.
45 This value should be cleared whenever the gap is read.
49 /** The PID that the zone's data comes from. */
52 /** The thread ID the zone's data comes from. */