SysV IPC headers
[reactos.git] / posix / include / sys / msg.h
1 /* $Id: msg.h,v 1.3 2002/05/17 01:37:15 hyperion Exp $
2 */
3 /*
4 * sys/msg.h
5 *
6 * message queue structures. Conforming to the Single UNIX(r) Specification
7 * Version 2, System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __SYS_SOCKET_H_INCLUDED__
26 #define __SYS_SOCKET_H_INCLUDED__
27
28 /* INCLUDES */
29 #include <sys/ipc.h>
30
31 /* OBJECTS */
32
33 /* TYPES */
34 typedef unsigned int msgqnum_t; /* Used for the number of messages in the message queue */
35 typedef unsigned int msglen_t; /* Used for the number of bytes allowed in a message queue */
36
37 struct msqid_ds
38 {
39 struct ipc_perm msg_perm; /* operation permission structure */
40 msgqnum_t msg_qnum; /* number of messages currently on queue */
41 msglen_t msg_qbytes; /* maximum number of bytes allowed on queue */
42 pid_t msg_lspid; /* process ID of last msgsnd() */
43 pid_t msg_lrpid; /* process ID of last msgrcv() */
44 time_t msg_stime; /* time of last msgsnd() */
45 time_t msg_rtime; /* time of last msgrcv() */
46 time_t msg_ctime; /* time of last change */
47 };
48
49 /* CONSTANTS */
50 /* Message operation flag */
51 #define MSG_NOERROR (0x00001000) /* No error if big message */
52
53 /* PROTOTYPES */
54 int msgctl(int, int, struct msqid_ds *);
55 int msgget(key_t, int);
56 ssize_t msgrcv(int, void *, size_t, long int, int);
57 int msgsnd(int, const void *, size_t, int);
58
59 /* MACROS */
60
61 #endif /* __SYS_SOCKET_H_INCLUDED__ */
62
63 /* EOF */
64