Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/dev Cleanup syscall context creation
details: https://anonhg.NetBSD.org/src/rev/574f784a488f
branches: trunk
changeset: 769397:574f784a488f
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Sep 08 12:37:28 2011 +0000
description:
Cleanup syscall context creation
diffstat:
sys/arch/usermode/dev/cpu.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (33 lines):
diff -r b0dfcbefc613 -r 574f784a488f sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c Thu Sep 08 12:10:13 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c Thu Sep 08 12:37:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.37 2011/09/08 12:10:13 jmcneill Exp $ */
+/* $NetBSD: cpu.c,v 1.38 2011/09/08 12:37:28 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "opt_hz.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.37 2011/09/08 12:10:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.38 2011/09/08 12:37:28 reinoud Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -335,11 +335,9 @@
2, func, arg);
/* set up the ucontext for the syscall */
- pcb2->pcb_ucp.uc_flags = _UC_CPU;
- /* hack for it sets the stack anyway!! */
- pcb2->pcb_syscall_ucp.uc_stack.ss_sp =
- ((uint8_t *) pcb2->pcb_syscall_ucp.uc_stack.ss_sp) - 4;
- pcb2->pcb_syscall_ucp.uc_stack.ss_size = 0;
+ pcb2->pcb_syscall_ucp.uc_flags = _UC_CPU;
+ pcb2->pcb_syscall_ucp.uc_link = NULL;
+ pcb2->pcb_syscall_ucp.uc_stack.ss_size = 0; /* no stack move */
thunk_makecontext_1(&pcb2->pcb_syscall_ucp, (void (*)(void)) syscall,
l2);
}
Home |
Main Index |
Thread Index |
Old Index