1 |
/* Main function for root server. |
/* Main function for root server. |
2 |
Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. |
3 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
4 |
|
|
5 |
The GNU Hurd is free software; you can redistribute it and/or |
The GNU Hurd is free software; you can redistribute it and/or |
255 |
is not the server thread and two alternating worker |
is not the server thread and two alternating worker |
256 |
threads), because it is started before the task server is |
threads), because it is started before the task server is |
257 |
running, while the others need none. */ |
running, while the others need none. */ |
258 |
mods[i].nr_extra_threads = (i == MOD_PHYSMEM ? 3 : 0); |
switch (i) |
259 |
|
{ |
260 |
|
case MOD_PHYSMEM: |
261 |
|
mods[i].nr_extra_threads = 3; |
262 |
|
break; |
263 |
|
case MOD_TASK: |
264 |
|
mods[i].nr_extra_threads = 1; |
265 |
|
break; |
266 |
|
default: |
267 |
|
mods[i].nr_extra_threads = 0; |
268 |
|
break; |
269 |
|
} |
270 |
thread_no += mods[i].nr_extra_threads; |
thread_no += mods[i].nr_extra_threads; |
271 |
|
|
272 |
/* Allocate some memory for the startup page. We allocate |
/* Allocate some memory for the startup page. We allocate |
801 |
panic ("Sending startup message to task thread failed: %u", |
panic ("Sending startup message to task thread failed: %u", |
802 |
l4_error_code ()); |
l4_error_code ()); |
803 |
|
|
804 |
assert (!mods[mod].nr_extra_threads); |
assert (mod == MOD_TASK || !mods[mod].nr_extra_threads); |
805 |
|
|
806 |
/* Now serve the first page request. */ |
/* Now serve the first page request. */ |
807 |
{ |
{ |
838 |
static void |
static void |
839 |
start_task (void) |
start_task (void) |
840 |
{ |
{ |
841 |
|
debug ("%s", "Starting task server.\n"); |
842 |
start_elf (MOD_TASK); |
start_elf (MOD_TASK); |
843 |
} |
} |
844 |
|
|
846 |
static void |
static void |
847 |
start_deva (void) |
start_deva (void) |
848 |
{ |
{ |
849 |
|
debug ("%s", "Starting deva server.\n"); |
850 |
start_elf (MOD_DEVA); |
start_elf (MOD_DEVA); |
851 |
} |
} |
852 |
|
|
854 |
static void |
static void |
855 |
start_root_fs (void) |
start_root_fs (void) |
856 |
{ |
{ |
857 |
|
debug ("%s", "Starting root fs server.\n"); |
858 |
|
start_elf (MOD_ROOT_FS); |
859 |
} |
} |
860 |
|
|
861 |
|
|
1166 |
l4_msg_load (msg); |
l4_msg_load (msg); |
1167 |
l4_reply (from); |
l4_reply (from); |
1168 |
|
|
1169 |
|
debug ("%s", "Starting root fs\n"); |
1170 |
start_root_fs (); |
start_root_fs (); |
1171 |
} |
} |
1172 |
} |
} |
1470 |
{ |
{ |
1471 |
parse_args (argc, argv); |
parse_args (argc, argv); |
1472 |
|
|
1473 |
debug ("%s " PACKAGE_VERSION "\n", program_name); |
debug ("%s " PACKAGE_VERSION " (%x)\n", program_name, l4_my_global_id ()); |
1474 |
|
|
1475 |
find_components (); |
find_components (); |
1476 |
|
|