From: "H. J. Lu" <hjl@lucon.org>
To: Johannes Stezenbach <js@convergence.de>
Cc: linux-mips@oss.sgi.com, GNU C Library <libc-alpha@sources.redhat.com>
Subject: Re: LTP testing: msgctl/IPC_STAT
Date: Fri, 19 Jul 2002 08:00:14 -0700 [thread overview]
Message-ID: <20020719080014.A20377@lucon.org> (raw)
In-Reply-To: <20020719143034.GA5956@convergence.de>; from js@convergence.de on Fri, Jul 19, 2002 at 04:30:34PM +0200
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Fri, Jul 19, 2002 at 04:30:34PM +0200, Johannes Stezenbach wrote:
> I was investigating LTP test suite failures of the msgctl01,
> msgctl02, msgsnd01 and msgsnd02 tests. It seems that they
> are caused by a mismatch between /usr/include/bits/msq.h
> and linux/include/asm-mips/msgbuf.h.
>
> I suggest the following patch which makes mips' msgbuf.h
> a copy of the one in include/asm-i386.
>
I prefer we fix glibc. Here is a patch.
H.J.
[-- Attachment #2: glibc-mips-msg.patch --]
[-- Type: text/plain, Size: 2716 bytes --]
2002-07-19 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/mips/bits/msq.h: New.
--- sysdeps/unix/sysv/linux/mips/bits/msq.h.mips Fri Jul 19 07:57:55 2002
+++ sysdeps/unix/sysv/linux/mips/bits/msq.h Fri Jul 19 07:57:15 2002
@@ -0,0 +1,74 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ 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.
+
+ 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
+ Lesser General Public License for more details.
+
+ 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. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Define options for message queue functions. */
+#define MSG_NOERROR 010000 /* no error if message is too big */
+#ifdef __USE_GNU
+# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+#endif
+
+/* Types used in the structure definition. */
+typedef unsigned long int msgqnum_t;
+typedef unsigned long int msglen_t;
+
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __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 */
+ unsigned long int __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+#ifdef __USE_MISC
+
+# define msg_cbytes __msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+ {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short int msgseg;
+ };
+
+#endif /* __USE_MISC */
next prev parent reply other threads:[~2002-07-19 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 14:30 LTP testing: msgctl/IPC_STAT Johannes Stezenbach
2002-07-19 15:00 ` H. J. Lu [this message]
2002-07-22 6:41 ` Carsten Langgaard
2002-07-22 6:31 ` Carsten Langgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020719080014.A20377@lucon.org \
--to=hjl@lucon.org \
--cc=js@convergence.de \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.