diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-11-03 21:23:23 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-11-03 21:23:23 +0000 |
commit | efe8cba2b7da0238a8b20c2efb32735c67f1d43c (patch) | |
tree | b20e8522b517b5c6384993c015f09a58da95326e /lib | |
parent | 21871ee7d48cbedbbe431bc6b9a394cf8c5194c1 (diff) |
Dont double fork, and since the assembles the same, use -1, instead of 0xff
to subtract one.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/arch/sh/sys/fork.S | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libc/arch/sh/sys/fork.S b/lib/libc/arch/sh/sys/fork.S index 761116c0697..9e5db8af913 100644 --- a/lib/libc/arch/sh/sys/fork.S +++ b/lib/libc/arch/sh/sys/fork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.S,v 1.1 2006/10/10 22:07:10 miod Exp $ */ +/* $OpenBSD: fork.S,v 1.2 2006/11/03 21:23:22 drahn Exp $ */ /* $NetBSD: fork.S,v 1.10 2006/01/06 05:11:29 uwe Exp $ */ /*- @@ -45,11 +45,7 @@ * */ _SYSCALL(fork,fork) - mov #SYS_fork, r0 - trapa #0x80 - bf err - - add #0xff, r1 /* from 1 to 0 in child, 0 to -1 in parent */ + add #-1, r1 /* from 1 to 0 in child, 0 to -1 in parent */ rts and r1, r0 /* 0 in child, child pid in parent */ |