diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-01-26 19:01:36 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-01-26 19:01:36 +0100 |
commit | 8d51e7fa1a1dbcbde513c2b756d504c879598907 (patch) | |
tree | 4cd1a3aaab346ac990bc9058e8cc4928258be6ae /sys/src/9/pc/trap.c | |
parent | 60bb408acca3b48b17f9158132849b894ad9f234 (diff) |
kernel: implement portable userinit() and simplify process creation
replace machine specific userinit() by a portable
implemntation that uses kproc() to create the first
process. the initcode text is mapped using kmap(),
so there is no need for machine specific tmpmap()
functions.
initcode stack preparation should be done in init0()
where the stack is mapped and can be accessed directly.
replacing the machine specific userinit() allows some
big simplifications as sysrfork() and kproc() are now
the only callers of newproc() and we can avoid initializing
fields that we know are being initialized by these
callers.
rename autogenerated init.h and reboot.h headers.
the initcode[] and rebootcode[] blobs are now in *.i
files and hex generation was moved to portmkfile. the
machine specific mkfile only needs to specify how to
build rebootcode.out and initcode.out.
Diffstat (limited to 'sys/src/9/pc/trap.c')
-rw-r--r-- | sys/src/9/pc/trap.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/src/9/pc/trap.c b/sys/src/9/pc/trap.c index 97931807f..22cef6d8a 100644 --- a/sys/src/9/pc/trap.c +++ b/sys/src/9/pc/trap.c @@ -1107,10 +1107,6 @@ forkchild(Proc *p, Ureg *ureg) memmove(cureg, ureg, sizeof(Ureg)); /* return value of syscall in child */ cureg->ax = 0; - - /* Things from bottom of syscall which were never executed */ - p->psstate = 0; - p->insyscall = 0; } /* Give enough context in the ureg to produce a kernel stack for |