Thu Mar 19 09:36:38 2009 UTC ()
Simple syscall_establish() support.
(should use kernel sources version, but it's buried inside a
module with a lot of junk in it, so shortcut for now)


(pooka)
diff -r1.19 -r1.20 src/sys/rump/librump/rumpkern/misc_stub.c

cvs diff -r1.19 -r1.20 src/sys/rump/librump/rumpkern/Attic/misc_stub.c (expand / switch to unified diff)

--- src/sys/rump/librump/rumpkern/Attic/misc_stub.c 2009/03/18 17:56:15 1.19
+++ src/sys/rump/librump/rumpkern/Attic/misc_stub.c 2009/03/19 09:36:38 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: misc_stub.c,v 1.19 2009/03/18 17:56:15 pooka Exp $ */ 1/* $NetBSD: misc_stub.c,v 1.20 2009/03/19 09:36:38 pooka Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2007 Antti Kantee. All Rights Reserved. 4 * Copyright (c) 2007 Antti Kantee. All Rights Reserved.
5 * 5 *
6 * Development of this software was supported by Google Summer of Code. 6 * Development of this software was supported by Google Summer of Code.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 */ 28 */
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: misc_stub.c,v 1.19 2009/03/18 17:56:15 pooka Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: misc_stub.c,v 1.20 2009/03/19 09:36:38 pooka Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/cpu.h> 34#include <sys/cpu.h>
35#include <sys/evcnt.h> 35#include <sys/evcnt.h>
36#include <sys/event.h> 36#include <sys/event.h>
37#include <sys/sched.h> 37#include <sys/sched.h>
38#include <sys/sysctl.h> 38#include <sys/sysctl.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/syscallvar.h> 40#include <sys/syscallvar.h>
41#include <sys/xcall.h> 41#include <sys/xcall.h>
42 42
43#ifdef __sparc__ 43#ifdef __sparc__
44 /*  44 /*
@@ -81,26 +81,33 @@ evcnt_attach_dynamic(struct evcnt *ev, i @@ -81,26 +81,33 @@ evcnt_attach_dynamic(struct evcnt *ev, i
81{ 81{
82 82
83} 83}
84 84
85void 85void
86evcnt_detach(struct evcnt *ev) 86evcnt_detach(struct evcnt *ev)
87{ 87{
88 88
89} 89}
90 90
91int 91int
92syscall_establish(const struct emul *em, const struct syscall_package *sp) 92syscall_establish(const struct emul *em, const struct syscall_package *sp)
93{ 93{
 94 extern struct sysent rump_sysent[];
 95 int i;
 96
 97 KASSERT(em == NULL || em == &emul_netbsd);
 98
 99 for (i = 0; sp[i].sp_call; i++)
 100 rump_sysent[sp[i].sp_code].sy_call = sp[i].sp_call;
94 101
95 return 0; 102 return 0;
96} 103}
97 104
98int 105int
99syscall_disestablish(const struct emul *em, const struct syscall_package *sp) 106syscall_disestablish(const struct emul *em, const struct syscall_package *sp)
100{ 107{
101 108
102 return 0; 109 return 0;
103} 110}
104 111
105/* crosscalls not done, no other hardware CPUs */ 112/* crosscalls not done, no other hardware CPUs */
106uint64_t 113uint64_t