Files
glibc/sysdeps/gnu/bits/msq.h
T

78 lines
2.6 KiB
C
Raw Normal View History

/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
1996-12-10 03:08:06 +00:00
This file is part of the GNU C Library.
1995-09-08 17:02:25 +00:00
1996-12-10 03:08:06 +00:00
The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
1995-09-08 17:02:25 +00:00
1996-12-10 03:08:06 +00:00
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
Lesser General Public License for more details.
1995-09-08 17:02:25 +00:00
2001-07-06 04:58:11 +00:00
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
1995-09-08 17:02:25 +00:00
1997-11-26 04:23:08 +00:00
#ifndef _SYS_MSG_H
1997-12-22 20:53:38 +00:00
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
1997-11-26 04:23:08 +00:00
#endif
1996-12-10 03:08:06 +00:00
2000-02-25 09:00:58 +00:00
#include <bits/types.h>
#include <bits/ipctypes.h>
1995-09-08 17:02:25 +00:00
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
2000-02-25 09:00:58 +00:00
#ifdef __USE_GNU
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
#endif
/* Types used in the structure definition. */
typedef unsigned short int msgqnum_t;
typedef unsigned short int msglen_t;
1995-09-08 17:02:25 +00:00
/* Structure of record for one message inside the kernel.
1997-12-22 20:53:38 +00:00
The type `struct msg' is opaque. */
1995-09-08 17:02:25 +00:00
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
2000-07-27 06:25:28 +00:00
struct msg *__unbounded __msg_first; /* pointer to first message on queue */
struct msg *__unbounded __msg_last; /* pointer to last message on queue */
1995-09-08 17:02:25 +00:00
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgrcv command */
__time_t msg_ctime; /* time of last change */
2000-07-27 06:25:28 +00:00
struct wait_queue *__unbounded __wwait; /* ??? */
struct wait_queue *__unbounded __rwait; /* ??? */
1995-09-08 17:02:25 +00:00
unsigned short int __msg_cbytes;/* current number of bytes on queue */
2000-02-25 09:00:58 +00:00
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
1997-12-22 20:53:38 +00:00
__ipc_pid_t msg_lspid; /* pid of last msgsnd() */
__ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
1995-09-08 17:02:25 +00:00
};
#ifdef __USE_MISC
1997-12-22 20:53:38 +00:00
# define msg_cbytes __msg_cbytes
/* ipcs ctl commands */
1997-12-22 20:53:38 +00:00
# define MSG_STAT 11
# define MSG_INFO 12
/* buffer for msgctl calls IPC_INFO, MSG_INFO */
1996-12-10 03:08:06 +00:00
struct msginfo
1997-11-26 04:23:08 +00:00
{
int msgpool;
int msgmap;
int msgmax;
int msgmnb;
int msgmni;
int msgssz;
int msgtql;
1997-12-22 20:53:38 +00:00
unsigned short int msgseg;
1997-11-26 04:23:08 +00:00
};
#endif /* __USE_MISC */