Debian Codegraph @

share/libc/sys/ipc.h

raw
1 /**************************************************************************/
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /**************************************************************************/
22
23 #ifndef __FC_SYS_IPC_H__
24 #define __FC_SYS_IPC_H__
25 #include "../features.h"
26 __PUSH_FC_STDLIB
27 __BEGIN_DECLS
28
29 #include "../__fc_define_mode_t.h"
30 #include "../__fc_define_uid_and_gid.h"
31 #include "../__fc_define_key_t.h"
32
33 struct ipc_perm {
34 uid_t uid;
35 gid_t gid;
36 uid_t cuid;
37 gid_t cgid;
38 mode_t mode;
39 };
40
41 // The values for the constants below are based on an x86 Linux,
42 // declared in the order given by POSIX.1-2008.
43
44 #define IPC_CREAT 01000
45 #define IPC_EXCL 02000
46 #define IPC_NOWAIT 04000
47
48 #define IPC_PRIVATE ((key_t) 0)
49
50 #define IPC_RMID 0
51 #define IPC_SET 1
52 #define IPC_STAT 2
53
54 extern key_t ftok(const char *, int);
55
56 __END_DECLS
57 __POP_FC_STDLIB
58 #endif