Debian Codegraph @

share/libc/sys/msg.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_SHM
24 #define __FC_SYS_SHM
25 #include "../features.h"
26 __PUSH_FC_STDLIB
27 #include "__fc_define_pid_t.h"
28 #include "__fc_define_size_t.h"
29 #include "__fc_define_ssize_t.h"
30 #include "__fc_define_time_t.h"
31 #include "ipc.h"
32
33 __BEGIN_DECLS
34
35 typedef unsigned long msgqnum_t;
36 typedef unsigned long msglen_t;
37
38 #define MSG_NOERROR 010000
39
40 struct msqid_ds {
41 struct ipc_perm msg_perm;
42 msgqnum_t msg_qnum;
43 msglen_t msg_qbytes;
44 pid_t msg_lspid;
45 pid_t msg_lrpid;
46 time_t msg_stime;
47 time_t msg_rtime;
48 time_t msg_ctime;
49 };
50
51 extern int msgctl(int msqid, int cmd, struct msqid_ds *buf);
52
53 extern int msgget(key_t key, int msgflg);
54
55 extern ssize_t msgrcv(int msgid, void *msgp, size_t msgsz, long msgtyp,
56 int msgflg);
57
58 extern int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
59
60 __END_DECLS
61
62 __POP_FC_STDLIB
63 #endif