Update.
[glibc.git] / sysvipc / sys / msg.h
blob56938bf6134203b56fbac08020c0d6663866c533
1 /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 #ifndef _SYS_MSG_H
20 #define _SYS_MSG_H
22 #include <features.h>
23 #include <sys/types.h>
25 /* Get common definition of System V style IPC. */
26 #include <sys/ipc.h>
28 /* Get system dependent definition of `struct msqid_ds' and more. */
29 #include <bits/msq.h>
31 /* The following System V style IPC functions implement a message queue
32 system. The definition is found in XPG2. */
34 /* Template for struct to be used as argument for `msgsnd' and `msgrcv'. */
35 struct msgbuf
37 long int mtype; /* type of received/sent message */
38 char mtext[1]; /* text of the message */
42 __BEGIN_DECLS
44 /* Message queue control operation. */
45 extern int msgctl __P ((int __msqid, int __cmd, struct msqid_ds *__buf));
47 /* Get messages queue. */
48 extern int msgget __P ((key_t __key, int __msgflg));
50 /* Receive message from message queue. */
51 extern int msgrcv __P ((int __msqid, void *__msgp, size_t __msgsz,
52 long int __msgtyp, int __msgflg));
54 /* Send message to message queue. */
55 extern int msgsnd __P ((int __msqid, void *__msgp, size_t __msgsz,
56 int __msgflg));
58 __END_DECLS
60 #endif /* sys/msg.h */