Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Support multiple syscall emuls.
details: https://anonhg.NetBSD.org/src/rev/8b179958cd36
branches: trunk
changeset: 785296:8b179958cd36
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Mar 07 18:49:13 2013 +0000
description:
Support multiple syscall emuls.
Rump kernels with only local clients have it easy, since they have to
support at most two syscall vectors (some calls such as mount/unmount
can be made only through the "native" NetBSD vector). Remote clients
are a whole different tin of green beans. This change addresses local
clients only.
diffstat:
sys/rump/librump/rumpkern/lwproc.c | 21 +++++++++++++++++----
sys/rump/librump/rumpkern/rumpkern.ifspec | 3 ++-
2 files changed, 19 insertions(+), 5 deletions(-)
diffs (76 lines):
diff -r 4a52f23bb317 -r 8b179958cd36 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Thu Mar 07 18:33:27 2013 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Thu Mar 07 18:49:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $ */
+/* $NetBSD: lwproc.c,v 1.20 2013/03/07 18:49:13 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.20 2013/03/07 18:49:13 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -44,6 +44,8 @@
#include "rump_private.h"
+struct emul *emul_default = &emul_netbsd;
+
static void
lwproc_proc_free(struct proc *p)
{
@@ -90,7 +92,7 @@
/*
* Allocate a new process. Mostly mimic fork by
* copying the properties of the parent. However, there are some
- * differences. For example, we never share the fd table.
+ * differences.
*
* Switch to the new lwp and return a pointer to it.
*/
@@ -125,7 +127,7 @@
p->p_stats = pstatscopy(parent->p_stats);
p->p_vmspace = vmspace_kernel();
- p->p_emul = &emul_netbsd;
+ p->p_emul = emul_default;
if (*parent->p_comm)
strcpy(p->p_comm, parent->p_comm);
else
@@ -400,3 +402,14 @@
return NULL;
return l;
}
+
+/* this interface is under construction (like the proverbial 90's web page) */
+int rump_i_know_what_i_am_doing_with_sysents = 0;
+void
+rump_lwproc_sysent_usenative()
+{
+
+ if (!rump_i_know_what_i_am_doing_with_sysents)
+ panic("don't use rump_lwproc_sysent_usenative()");
+ curproc->p_emul = &emul_netbsd;
+}
diff -r 4a52f23bb317 -r 8b179958cd36 sys/rump/librump/rumpkern/rumpkern.ifspec
--- a/sys/rump/librump/rumpkern/rumpkern.ifspec Thu Mar 07 18:33:27 2013 +0000
+++ b/sys/rump/librump/rumpkern/rumpkern.ifspec Thu Mar 07 18:49:13 2013 +0000
@@ -1,4 +1,4 @@
-; $NetBSD: rumpkern.ifspec,v 1.10 2011/01/02 12:52:25 pooka Exp $
+; $NetBSD: rumpkern.ifspec,v 1.11 2013/03/07 18:49:13 pooka Exp $
NAME|kern
PUBHDR|include/rump/rumpkern_if_pub.h
@@ -28,5 +28,6 @@
void |lwproc_switch |struct lwp *
void |lwproc_releaselwp |void
struct lwp * |lwproc_curlwp |void
+void |lwproc_sysent_usenative|void
void |allbetsareoff_setid |pid_t, int
Home |
Main Index |
Thread Index |
Old Index