From d12ee02d12242cf07bbde64d65f2b1bcf3a26221 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 13 Apr 1997 16:58:08 +0000 Subject: [PATCH] Don't forget to set `runtime' in fork_trampoline(). The time slice before switching to a child for the first time was being counted twice. I think this only affected unimportant statistics. Simplified arg handling in fork_trampoline(). splz() doesn't actually smash the registers of interest. --- sys/amd64/amd64/exception.S | 14 +++++++------- sys/amd64/amd64/exception.s | 14 +++++++------- sys/i386/i386/exception.s | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index cfeea3f14a7d..0ab3b33952e2 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ + * $Id: exception.s,v 1.23 1997/04/07 11:42:09 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,14 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* splz smashes regs */ - pushl %esi - - movl $SWI_AST_MASK,%eax /* spl0() */ - movl %eax,_cpl + movl $SWI_AST_MASK,_cpl call _splz - popl %esi /* arg1 */ + pushl $_runtime + call _microtime + popl %eax + + pushl %ebx /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */ diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s index cfeea3f14a7d..0ab3b33952e2 100644 --- a/sys/amd64/amd64/exception.s +++ b/sys/amd64/amd64/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ + * $Id: exception.s,v 1.23 1997/04/07 11:42:09 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,14 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* splz smashes regs */ - pushl %esi - - movl $SWI_AST_MASK,%eax /* spl0() */ - movl %eax,_cpl + movl $SWI_AST_MASK,_cpl call _splz - popl %esi /* arg1 */ + pushl $_runtime + call _microtime + popl %eax + + pushl %ebx /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */ diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index cfeea3f14a7d..0ab3b33952e2 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ + * $Id: exception.s,v 1.23 1997/04/07 11:42:09 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,14 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* splz smashes regs */ - pushl %esi - - movl $SWI_AST_MASK,%eax /* spl0() */ - movl %eax,_cpl + movl $SWI_AST_MASK,_cpl call _splz - popl %esi /* arg1 */ + pushl $_runtime + call _microtime + popl %eax + + pushl %ebx /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */