From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling
Date: Sun, 28 Jan 2018 15:25:00 -0000 [thread overview]
Message-ID: <20180127225102.11373-3-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20180127225102.11373-1-samuel.thibault@ens-lyon.org>
This was dropped from GNU Mach in 2006.
* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
MACH_IPC_COMPAT.
---
ChangeLog | 4 ++++
mach/Machrules | 2 +-
mach/mach/mach_traps.h | 3 +--
sysdeps/mach/hurd/fork.c | 35 +++--------------------------------
4 files changed, 9 insertions(+), 35 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4e1e4bf730..7d7800dbb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
--disable-libcilkrts to gcc configure.
* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
+ * mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
+ * mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
+ * sysdeps/mach/hurd/fork.c (__fork): Drop special casing
+ MACH_IPC_COMPAT.
2018-01-27 James Clarke <jrtc27@jrtc27.com>
diff --git a/mach/Machrules b/mach/Machrules
index 49e6399b7c..4f9ec421ec 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -51,7 +51,7 @@ $(objpfx)dummy.mk:
$(make-target-directory)
echo '# Empty' > $@
-MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0 \
+MIGFLAGS = -DSTANDALONE -DTypeCheck=0 \
$(+includes) $(migdefines) -subrprefix __
# Putting CC in the enivronment makes the mig wrapper script
# use the same compiler setup we are using to run cpp.
diff --git a/mach/mach/mach_traps.h b/mach/mach/mach_traps.h
index 5e09a95310..cefbd2d372 100644
--- a/mach/mach/mach_traps.h
+++ b/mach/mach/mach_traps.h
@@ -17,8 +17,7 @@
/* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
-
- This file omits the MACH_IPC_COMPAT functions. */
+ */
#ifndef _MACH_MACH_TRAPS_H
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index fe3f544f2b..b55eecffc6 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -213,38 +213,9 @@ __fork (void)
{
/* This is a receive right. We want to give the child task
its own new receive right under the same name. */
- err = __mach_port_allocate_name (newtask,
- MACH_PORT_RIGHT_RECEIVE,
- portnames[i]);
- if (err == KERN_NAME_EXISTS)
- {
- /* It already has a right under this name (?!). Well,
- there is this bizarre old Mach IPC feature (in #ifdef
- MACH_IPC_COMPAT in the ukernel) which results in new
- tasks getting a new receive right for task special
- port number 2. What else might be going on I'm not
- sure. So let's check. */
-#if !MACH_IPC_COMPAT
-#define TASK_NOTIFY_PORT 2
-#endif
- assert (({ mach_port_t thisport, notify_port;
- mach_msg_type_name_t poly;
- (__task_get_special_port (newtask,
- TASK_NOTIFY_PORT,
- ¬ify_port) == 0 &&
- __mach_port_extract_right
- (newtask,
- portnames[i],
- MACH_MSG_TYPE_MAKE_SEND,
- &thisport, &poly) == 0 &&
- (thisport == notify_port) &&
- __mach_port_deallocate (__mach_task_self (),
- thisport) == 0 &&
- __mach_port_deallocate (__mach_task_self (),
- notify_port) == 0);
- }));
- }
- else if (err)
+ if (err = __mach_port_allocate_name (newtask,
+ MACH_PORT_RIGHT_RECEIVE,
+ portnames[i]))
LOSE;
if (porttypes[i] & MACH_PORT_TYPE_SEND)
{
--
2.15.1
next prev parent reply other threads:[~2018-01-27 22:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-28 15:25 [hurd,commited 0/7] fix warnings Samuel Thibault
2018-01-28 15:25 ` [hurd,commited 6/7] hurd: Fix enabling vm_copy Samuel Thibault
2018-01-28 15:25 ` Samuel Thibault [this message]
2018-01-28 15:29 ` [hurd,commited 4/7] hurd: fix warning Samuel Thibault
2018-01-28 16:07 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
2018-01-29 16:33 ` Joseph Myers
2018-01-28 16:32 ` [hurd,commited 5/7] hurd: fix warning Samuel Thibault
2018-01-28 16:36 ` [hurd,commited 1/7] " Samuel Thibault
2018-01-28 16:53 ` [hurd,commited 7/7] " Samuel Thibault
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=20180127225102.11373-3-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=libc-alpha@sourceware.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).