diff options
author | rsc <rsc> | 2009-05-31 00:38:51 +0000 |
---|---|---|
committer | rsc <rsc> | 2009-05-31 00:38:51 +0000 |
commit | 215738336aec0d5118a90a79d380c41910f6ee4b (patch) | |
tree | 87fa465103f5d024a2e0292db2dddbb3ac54816a /sysproc.c | |
parent | dae9b0d48a94683c0a49e88e4b739482788d7175 (diff) | |
download | xv6-labs-215738336aec0d5118a90a79d380c41910f6ee4b.tar.gz xv6-labs-215738336aec0d5118a90a79d380c41910f6ee4b.tar.bz2 xv6-labs-215738336aec0d5118a90a79d380c41910f6ee4b.zip |
move fork into proc.c
Diffstat (limited to 'sysproc.c')
-rw-r--r-- | sysproc.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -8,17 +8,7 @@ int sys_fork(void) { - int pid; - struct proc *np; - - if((np = copyproc(cp)) == 0) - return -1; - pid = np->pid; - - // Clear %eax so that fork returns 0 in the child. - np->tf->eax = 0; - np->state = RUNNABLE; - return pid; + return fork(); } int |