From: Tomas Hruby Date: Tue, 9 Feb 2010 15:12:20 +0000 (+0000) Subject: System task initialization moved to main() X-Git-Tag: v3.1.7~305 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/dnssec-keyfromlabel.html?a=commitdiff_plain;h=8a03d497b81135eb1dcf9e4e0f4e9a18b59d1abb;p=minix.git System task initialization moved to main() - the system task initialization code does not really need to be part of the system task process. An earlier initialization in kernel is cleaner as it does not only initialize the syscalls but also irq hooks etc. --- diff --git a/kernel/main.c b/kernel/main.c index fe28258c5..16b859e39 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -210,6 +210,9 @@ PUBLIC void main() /* Architecture-dependent initialization. */ arch_init(); + /* System and processes initialization */ + system_init(); + #if SPROFILE sprofiling = 0; /* we're not profiling until instructed to */ #endif /* SPROFILE */ diff --git a/kernel/proto.h b/kernel/proto.h index 7a89feacf..48a88453e 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -59,6 +59,7 @@ _PROTOTYPE( void send_sig, (int proc_nr, int sig_nr) ); _PROTOTYPE( void cause_sig, (proc_nr_t proc_nr, int sig_nr) ); _PROTOTYPE( void sig_delay_done, (struct proc *rp) ); _PROTOTYPE( void sys_task, (void) ); +_PROTOTYPE( void system_init, (void) ); #define numap_local(proc_nr, vir_addr, bytes) \ umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes)) _PROTOTYPE( phys_bytes umap_grant, (struct proc *, cp_grant_id_t, vir_bytes)); diff --git a/kernel/system.c b/kernel/system.c index b1a49f2d7..2e7d5d71b 100644 --- a/kernel/system.c +++ b/kernel/system.c @@ -75,10 +75,6 @@ PUBLIC void sys_task() int who_p; endpoint_t who_e; - /* Initialize the system task. */ - initialize(); - - while (TRUE) { struct proc *restarting; @@ -146,7 +142,7 @@ PUBLIC void sys_task() /*===========================================================================* * initialize * *===========================================================================*/ -PRIVATE void initialize(void) +PUBLIC void system_init(void) { register struct priv *sp; int i;