diff --git a/init/main.c b/init/main.c index f80b6eb..0f96895 100644 --- a/init/main.c +++ b/init/main.c @@ -129,8 +129,10 @@ int main() { initrd_get(initrd); size_t datapos=find_loc("vfs",initrd); load_proc(datapos,initrd); + while(rpc_is_init(2)==0); datapos=find_loc("devfs",initrd); load_proc(datapos,initrd); + while(rpc_is_init(3)==0); int err=mount("","devfs","/dev"); if (err) { serial_print("Failed to mount devfs\n"); @@ -138,11 +140,11 @@ int main() { } datapos=find_loc("initrd_drv",initrd); load_proc(datapos,initrd); - for(int i=0;i<10000000;i++); + while(rpc_is_init(4)==0); serial_print("Loading VGA driver\n"); datapos=find_loc("vga_drv",initrd); load_proc_devfs(datapos); - for(int i=0;i<10000000;i++); + while(rpc_is_init(5)==0); serial_print("Opening /dev/vga\n"); stdout=fopen("/dev/vga","w"); if (!stdout) { diff --git a/initrd_drv/initrd_drv b/initrd_drv/initrd_drv index e2a42b1..c6b59fc 100755 Binary files a/initrd_drv/initrd_drv and b/initrd_drv/initrd_drv differ diff --git a/kernel/cpu/i386/isr.c b/kernel/cpu/i386/isr.c index 63f75ff..b22d018 100644 --- a/kernel/cpu/i386/isr.c +++ b/kernel/cpu/i386/isr.c @@ -290,6 +290,9 @@ void isr_handler(registers_t* r) { case SYSCALL_RPC_MARK_AS_INIT: kernel_rpc_mark_as_init(); break; + case SYSCALL_RPC_IS_INIT: + r->ecx=kernel_rpc_is_init((pid_t)r->ebx); + break; default: break; } diff --git a/kernel/rpc.c b/kernel/rpc.c index 5193dc5..66d6b81 100644 --- a/kernel/rpc.c +++ b/kernel/rpc.c @@ -48,13 +48,7 @@ static void clear_init(pid_t pid) { process_ready_bmap[byte]=process_ready_bmap[byte]&(~(1<