[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 03/06: startup: Simplify reference handling.
From: |
Samuel Thibault |
Subject: |
[hurd] 03/06: startup: Simplify reference handling. |
Date: |
Sat, 10 Jun 2017 00:38:17 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit ef729f8642cc96ddfd3f5b5db4d6aac057b1d397
Author: Justus Winter <address@hidden>
Date: Sun Mar 12 12:35:39 2017 +0100
startup: Simplify reference handling.
* startup/startup.c (launch_core_servers): Instead of copying a send
right and then deallocating it, move it.
(init_stdarrays): Likewise.
---
startup/startup.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/startup/startup.c b/startup/startup.c
index 913742c..4a0304e 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -755,9 +755,7 @@ launch_core_servers (void)
fprintf (stderr, "Installed on /servers/startup\n");
err = startup_authinit_reply (authreply, authreplytype, 0, authproc,
- MACH_MSG_TYPE_COPY_SEND);
- assert_perror (err);
- err = mach_port_deallocate (mach_task_self (), authproc);
+ MACH_MSG_TYPE_MOVE_SEND);
assert_perror (err);
if (verbose)
@@ -818,8 +816,7 @@ launch_core_servers (void)
fprintf (stderr, "Message port registered\n");
/* Give the bootstrap FS its proc and auth ports. */
- err = fsys_init (bootport, fsproc, MACH_MSG_TYPE_COPY_SEND, authserver);
- mach_port_deallocate (mach_task_self (), fsproc);
+ err = fsys_init (bootport, fsproc, MACH_MSG_TYPE_MOVE_SEND, authserver);
if (err)
error (0, err, "fsys_init"); /* Not necessarily fatal. */
@@ -836,7 +833,6 @@ init_stdarrays ()
mach_port_t ref;
mach_port_t *std_port_array;
int *std_int_array;
- int i;
std_port_array = alloca (sizeof (mach_port_t) * INIT_PORT_MAX);
std_int_array = alloca (sizeof (int) * INIT_INT_MAX);
@@ -870,10 +866,8 @@ init_stdarrays ()
std_int_array[INIT_UMASK] = CMASK;
__USEPORT (PROC, proc_setexecdata (port, std_port_array,
- MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
+ MACH_MSG_TYPE_MOVE_SEND, INIT_PORT_MAX,
std_int_array, INIT_INT_MAX));
- for (i = 0; i < INIT_PORT_MAX; i++)
- mach_port_deallocate (mach_task_self (), std_port_array[i]);
}
/* Frobnicate the kernel task and the proc server's idea of it (PID 2),
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (150ff2a -> cb991b0), Samuel Thibault, 2017/06/09
- [hurd] 03/06: startup: Simplify reference handling.,
Samuel Thibault <=
- [hurd] 06/06: ext2fs: Reduce verbosity of missing xattr support on the FS, Samuel Thibault, 2017/06/09
- [hurd] 01/06: hurd: Use polymorphic port types to return some rights., Samuel Thibault, 2017/06/09
- [hurd] 04/06: Pass the kernel's task port to proc., Samuel Thibault, 2017/06/09
- [hurd] 02/06: proc: Hierarchical proc servers., Samuel Thibault, 2017/06/09
- [hurd] 05/06: eth-multiplexer: Fix iohelp missing dependency., Samuel Thibault, 2017/06/10