1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/shm/Header.h
10 #ifndef AesalonSHM_Header_H
11 #define AesalonSHM_Header_H
13 #include <semaphore.h>
21 typedef struct SHMHeader SHMHeader
;
24 /** The overall size of the SHM in pages. */
27 /** The size of the configuration data (in pages). */
28 uint32_t configDataSize
;
30 /** The number of pages to use to store zone usage data in. */
31 uint32_t zoneUsagePages
;
32 /** The page offset that zones are created starting at. */
33 uint32_t zonePageOffset
;
34 /** The size of a zone, in pages. */
36 /** The number of zones currently in use. */
38 /** The number of zones that memory has been allocated for. */
39 uint32_t zonesAllocated
;
41 /** Packet semaphore: incremented when a packet is available for reading. */
42 sem_t packetSemaphore
;
43 /** Resizing semaphore; locked when a thread is resizing the SHM. */
44 sem_t resizeSemaphore
;
46 /** The last allocated process ID; used to assign 4-byte process IDs dynamically. */
47 uint32_t lastProcessID
;
48 /** The last allocated thread ID; used to assign 4-byte thread IDs dynamically. */
49 uint32_t lastThreadID
;