diff options
author | 2015-03-31 04:32:01 +0000 | |
---|---|---|
committer | 2015-03-31 04:32:01 +0000 | |
commit | 26e1ecc85e4cb7150f8657b3dfe28eaf6e48ff59 (patch) | |
tree | fdbd436f0044f6903de7a2fae2a0391c5e2359ce /lib/libc/arch/sparc | |
parent | Upon finding an AUX slot that has no driver for it (such as the (diff) | |
download | wireguard-openbsd-26e1ecc85e4cb7150f8657b3dfe28eaf6e48ff59.tar.xz wireguard-openbsd-26e1ecc85e4cb7150f8657b3dfe28eaf6e48ff59.zip |
Simplify fork/vfork logic: the kernel has handled returning zero in the child
for a long time, so there's no need to test the second return register here
in the asm stub.
ok and testing of many archs by krw@ miod@
Diffstat (limited to 'lib/libc/arch/sparc')
-rw-r--r-- | lib/libc/arch/sparc/sys/Ovfork.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/sparc/sys/fork.S | 7 |
2 files changed, 4 insertions, 17 deletions
diff --git a/lib/libc/arch/sparc/sys/Ovfork.S b/lib/libc/arch/sparc/sys/Ovfork.S index 9c20e6f2371..a0a9ce8d3d8 100644 --- a/lib/libc/arch/sparc/sys/Ovfork.S +++ b/lib/libc/arch/sparc/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: Ovfork.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: Ovfork.S,v 1.5 2015/03/31 04:32:02 guenther Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -32,16 +32,6 @@ * SUCH DAMAGE. */ -/* - * pid = vfork(); - * - * %o1 == 0 in parent process, 1 in child process. - * %o0 == pid of child in parent, pid of parent in child. - */ - #include "SYS.h" -SYSCALL(vfork) - dec %o1 ! from 1 to 0 in child, 0 to -1 in parent - retl - and %o0, %o1, %o0 ! return 0 in child, pid in parent +RSYSCALL(vfork) diff --git a/lib/libc/arch/sparc/sys/fork.S b/lib/libc/arch/sparc/sys/fork.S index 7e31698afde..83916669e78 100644 --- a/lib/libc/arch/sparc/sys/fork.S +++ b/lib/libc/arch/sparc/sys/fork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: fork.S,v 1.5 2015/03/31 04:32:02 guenther Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -34,7 +34,4 @@ #include "SYS.h" -SYSCALL(fork) - dec %o1 ! from 1 to 0 in child, 0 to -1 in parent - retl - and %o0, %o1, %o0 ! return 0 in child, pid in parent +RSYSCALL(fork) |