aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog57
-rw-r--r--bits/mqueue.h31
-rw-r--r--include/mqueue.h7
-rw-r--r--linuxthreads/ChangeLog11
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h3
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h3
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h6
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h6
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h3
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h3
-rw-r--r--nptl/ChangeLog19
-rw-r--r--nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/local_lim.h3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/mq_notify.c285
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h6
-rw-r--r--rt/Makefile13
-rw-r--r--rt/Versions5
-rw-r--r--rt/mqueue.h91
-rw-r--r--rt/tst-mqueue.h62
-rw-r--r--rt/tst-mqueue1.c416
-rw-r--r--rt/tst-mqueue2.c477
-rw-r--r--rt/tst-mqueue3.c238
-rw-r--r--rt/tst-mqueue4.c276
-rw-r--r--sysdeps/generic/bits/mqueue.h31
-rw-r--r--sysdeps/generic/mq_close.c31
-rw-r--r--sysdeps/generic/mq_getattr.c30
-rw-r--r--sysdeps/generic/mq_notify.c31
-rw-r--r--sysdeps/generic/mq_open.c36
-rw-r--r--sysdeps/generic/mq_receive.c32
-rw-r--r--sysdeps/generic/mq_send.c31
-rw-r--r--sysdeps/generic/mq_setattr.c33
-rw-r--r--sysdeps/generic/mq_timedreceive.c34
-rw-r--r--sysdeps/generic/mq_timedsend.c33
-rw-r--r--sysdeps/generic/mq_unlink.c30
-rw-r--r--sysdeps/unix/sysv/linux/bits/local_lim.h3
-rw-r--r--sysdeps/unix/sysv/linux/bits/mqueue.h32
-rw-r--r--sysdeps/unix/sysv/linux/mq_close.c35
-rw-r--r--sysdeps/unix/sysv/linux/mq_getattr.c34
-rw-r--r--sysdeps/unix/sysv/linux/mq_notify.c43
-rw-r--r--sysdeps/unix/sysv/linux/mq_open.c59
-rw-r--r--sysdeps/unix/sysv/linux/mq_receive.c36
-rw-r--r--sysdeps/unix/sysv/linux/mq_send.c35
-rw-r--r--sysdeps/unix/sysv/linux/mq_unlink.c39
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list4
49 files changed, 2690 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index dfaa11f7cc..1156766cf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2004-04-08 Ulrich Drepper <drepper@redhat.com>
+
+ * rt/tst-mqueue3.c: New file.
+ * rt/Makefile (tests): Add tst-mqueue3.
+
+2004-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * rt/tst-mqueue1.c: New file.
+ * rt/tst-mqueue2.c: New file.
+ * rt/tst-mqueue4.c: New file.
+ * rt/Makefile (tests): Add tst-mqueue1, tst-mqueue2, tst-mqueue4.
+
+ * rt/Versions (librt): Add mq_*@@GLIBC_2.3.4.
+ * rt/Makefile (headers): Add mqueue.h and bits/mqueue.h.
+ (mq-routines): Set.
+ (librt-routines): Use it.
+ * rt/mqueue.h: New file.
+ * include/mqueue.h: New file.
+ * sysdeps/generic/bits/mqueue.h: New file.
+ * sysdeps/generic/mq_setattr.c: New file.
+ * sysdeps/generic/mq_getattr.c: New file.
+ * sysdeps/generic/mq_notify.c: New file.
+ * sysdeps/generic/mq_close.c: New file.
+ * sysdeps/generic/mq_send.c: New file.
+ * sysdeps/generic/mq_unlink.c: New file.
+ * sysdeps/generic/mq_receive.c: New file.
+ * sysdeps/generic/mq_timedreceive.c: New file.
+ * sysdeps/generic/mq_timedsend.c: New file.
+ * sysdeps/generic/mq_open.c: New file.
+ * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/bits/mqueue.h: New file.
+ * sysdeps/unix/sysv/linux/syscalls.list: Add mq_timedsend,
+ mq_timedreceive and mq_setattr.
+ * sysdeps/unix/sysv/linux/mq_getattr.c: New file.
+ * sysdeps/unix/sysv/linux/mq_notify.c: New file.
+ * sysdeps/unix/sysv/linux/mq_close.c: New file.
+ * sysdeps/unix/sysv/linux/mq_send.c: New file.
+ * sysdeps/unix/sysv/linux/mq_unlink.c: New file.
+ * sysdeps/unix/sysv/linux/mq_receive.c: New file.
+ * sysdeps/unix/sysv/linux/mq_open.c: New file.
+
2004-04-09 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL): Move
@@ -18,14 +59,6 @@
(LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the
syscall argument registers.
-2004-04-09 Thorsten Kukuk <kukuk@suse.de>
-
- * sysdeps/s390/ffs.c: Don't add ffsl weak alias on s390x.
-
-2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: New file.
-
2004-04-09 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INTERNAL_SYSCALL): Add
@@ -37,6 +70,14 @@
(LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the
syscall argument registers.
+2004-04-09 Thorsten Kukuk <kukuk@suse.de>
+
+ * sysdeps/s390/ffs.c: Don't add ffsl weak alias on s390x.
+
+2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: New file.
+
2004-04-08 Ulrich Drepper <drepper@redhat.com>
* po/nl.po: Update from translation team.
diff --git a/bits/mqueue.h b/bits/mqueue.h
new file mode 100644
index 0000000000..27bb4824b8
--- /dev/null
+++ b/bits/mqueue.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2004 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 _MQUEUE_H
+# error "Never use <bits/mqueue.h> directly; include <mqueue.h> instead."
+#endif
+
+typedef int mqd_t;
+
+struct mq_attr
+{
+ long int mq_flags; /* Message queue flags. */
+ long int mq_maxmsg; /* Maximum number of messages. */
+ long int mq_msgsize; /* Maximum message size. */
+ long int mq_curmsgs; /* Number of messages currently queued. */
+};
diff --git a/include/mqueue.h b/include/mqueue.h
new file mode 100644
index 0000000000..1ac4f13445
--- /dev/null
+++ b/include/mqueue.h
@@ -0,0 +1,7 @@
+#include <rt/mqueue.h>
+
+#ifdef IS_IN_librt
+hidden_proto (mq_timedsend)
+hidden_proto (mq_timedreceive)
+hidden_proto (mq_setattr)
+#endif
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index cbdfc73ba4..ad881d4968 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,14 @@
+2004-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
+ Define.
+ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+ (_POSIX_MESSAGE_PASSING): Define.
+
2004-04-10 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
index e08763b1ad..96893c59da 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
@@ -87,3 +87,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
index 4027c4df99..ed6c3c589b 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
@@ -87,3 +87,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 3dae916554..06fd0a29b2 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -1,5 +1,5 @@
/* Define POSIX options for Linux.
- Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004 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
@@ -129,8 +129,8 @@
/* The barrier functions are available. */
#define _POSIX_BARRIERS 200112L
-/* POSIX message queues are not yet supported. */
-#undef _POSIX_MESSAGE_PASSING
+/* POSIX message queues are available. */
+#define _POSIX_MESSAGE_PASSING 200112L
/* The monotonic clock might be available. */
#define _POSIX_MONOTONIC_CLOCK 0
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
index 02da4d77dc..18a840ed98 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
@@ -1,5 +1,5 @@
/* Define POSIX options for Linux/ix86.
- Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004 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
@@ -135,8 +135,8 @@
/* The barrier functions are available. */
#define _POSIX_BARRIERS 200112L
-/* POSIX message queues are not yet supported. */
-#undef _POSIX_MESSAGE_PASSING
+/* POSIX message queues are available. */
+#define _POSIX_MESSAGE_PASSING 200112L
/* The monotonic clock might be available. */
#define _POSIX_MONOTONIC_CLOCK 0
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
index 73fa616082..629b1f89c1 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
@@ -87,3 +87,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
index 60212946c8..27ffa668f4 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
@@ -87,3 +87,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c197dd42ea..53fba001db 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,22 @@
+2004-04-12 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/mq-notify.c: New file.
+
+2004-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
+ * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
+ Define.
+ * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+ (_POSIX_MESSAGE_PASSING): Define.
+ * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
+ (_POSIX_MESSAGE_PASSING): Define.
+ * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
+ (_POSIX_MESSAGE_PASSING): Define.
+
2004-04-04 Ulrich Drepper <drepper@redhat.com>
* tst-context1.c (fct): Check whether correct stack is used.
diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h b/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
index bb3c4c061d..e0718780cc 100644
--- a/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
+++ b/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
@@ -84,3 +84,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
diff --git a/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h b/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h
index 0c2a2bd2b4..0bc8e048af 100644
--- a/nptl/sysdeps/unix/sy