2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
4 * This file is part of TUD:OS and distributed under the terms of the
5 * GNU Lesser General Public License 2.1.
6 * Please see the COPYING-LGPL-2.1 file for details.
14 #ifndef __INCLUDED_FROM_L4SHMC_H__
15 #error Do not include l4/shm/types.h directly, use l4/shm/shm.h!
18 #include <l4/re/c/dataspace.h>
21 L4SHMC_NAME_SIZE = 15,
22 L4SHMC_NAME_STRINGLEN = L4SHMC_NAME_SIZE + 1,
23 L4SHMC_CHUNK_NAME_SIZE = 15,
24 L4SHMC_CHUNK_NAME_STRINGLEN = L4SHMC_CHUNK_NAME_SIZE + 1,
25 L4SHMC_SIGNAL_NAME_SIZE = 15,
26 L4SHMC_SIGNAL_NAME_STRINGLEN = L4SHMC_SIGNAL_NAME_SIZE + 1,
28 L4SHMC_CHUNK_READY = 2,
29 L4SHMC_CHUNK_BUSY = 1,
30 L4SHMC_CHUNK_CLEAR = 0,
32 L4SHMC_CHUNK_MAGIC = 0xfedcba98,
35 /* l4shmc_chunk_desc_t is shared among address spaces */
36 /* private: This data structure is hidden for the clients */
38 l4_umword_t _magic; // magic
39 l4_addr_t _offset; // offset of chunk in shm-area
40 l4_umword_t _capacity; // capacity in bytes of chunk
41 l4_umword_t _size; // size of current payload
42 l4_umword_t _status; // status of chunk
43 char _name[L4SHMC_CHUNK_NAME_STRINGLEN]; // name of chunk
44 l4_addr_t _next; // next chunk in shm-area, as absolute offset
46 } l4shmc_chunk_desc_t;
48 /* l4shmc_area_t is local to one address space */
49 /* private: This data structure is hidden for the clients */
53 char _name[L4SHMC_NAME_STRINGLEN];
57 /* l4shmc_signal_t is local to one address space */
62 /* l4shmc_chunk_t is local to one address space */
64 l4shmc_chunk_desc_t *_chunk;
66 l4shmc_signal_t *_sig;
67 l4_umword_t _capacity;