aboutsummaryrefslogtreecommitdiff
path: root/proc/msg.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-07 16:05:48 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-17 18:24:59 +0100
commit1ad178fd00b675d686c2560829e9a10c5cb44f6f (patch)
tree0c2924328228307558ce52ce829274de27fde755 /proc/msg.c
parent40b354e4cc67f1fedf9d4c2ce8d050a9ac68a643 (diff)
downloadhurd-1ad178fd00b675d686c2560829e9a10c5cb44f6f.tar.gz
hurd-1ad178fd00b675d686c2560829e9a10c5cb44f6f.tar.bz2
hurd-1ad178fd00b675d686c2560829e9a10c5cb44f6f.zip
proc: call `startup_essential_task' earlier
Previously, the proc server did not call `startup_essential_task' until it got the message port of the startup server using `proc_setmsgport'. Now that we have `/servers/startup', we can do this in main, before we start our message service loop. A complication arises because the traditional startup server is single-threaded. Handle this by tweaking startup not to bind itself to `/servers/startup' before it is ready. * proc/main.c (main): Try to lookup `/servers/startup' and send the message here, or... * proc/msg.c (S_proc_setmsgport): ... fall back to the old way here. * proc/proc.h (startup_fallback): New variable. * startup/startup.c (main): Move code installing ourself on `/servers/startup' (install_as_translator): ... here. (launch_core_servers): And use it here, just before we reply to `/hurd/auth'.
Diffstat (limited to 'proc/msg.c')
-rw-r--r--proc/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proc/msg.c b/proc/msg.c
index 796cae38..c7bab99e 100644
--- a/proc/msg.c
+++ b/proc/msg.c
@@ -63,7 +63,7 @@ S_proc_setmsgport (struct proc *p,
prociterate (check_message_return, p);
p->p_checkmsghangs = 0;
- if (p == startup_proc)
+ if (p == startup_proc && startup_fallback)
{
/* Init is single threaded, so we can't delay our reply for
the essential task RPC; spawn a thread to do it. */