Module Name: src
Committed By: pooka
Date: Wed Nov 17 21:52:29 UTC 2010
Modified Files:
src/sys/rump/librump/rumpkern: rump.c
Log Message:
Provide a special rump_proxy_syscall for handling received proxy
syscalls and retire unused rump_syscall.
To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/rump/librump/rumpkern/rump.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.198 src/sys/rump/librump/rumpkern/rump.c:1.199
--- src/sys/rump/librump/rumpkern/rump.c:1.198 Wed Nov 17 19:54:09 2010
+++ src/sys/rump/librump/rumpkern/rump.c Wed Nov 17 21:52:29 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -107,6 +107,8 @@
static struct vmspace sp_vmspace;
static bool iamtheserver = false;
+static int rump_proxy_syscall(int, void *, register_t *);
+
static char rump_msgbuf[16*1024]; /* 16k should be enough for std rump needs */
static void
@@ -195,7 +197,7 @@
.spop_lwproc_release = rump_lwproc_releaselwp,
.spop_lwproc_newproc = rump_lwproc_newproc,
.spop_lwproc_curlwp = rump_lwproc_curlwp,
- .spop_syscall = rump_syscall,
+ .spop_syscall = rump_proxy_syscall,
};
int
@@ -634,8 +636,8 @@
return 0;
}
-int
-rump_syscall(int num, void *arg, register_t *retval)
+static int
+rump_proxy_syscall(int num, void *arg, register_t *retval)
{
struct lwp *l;
struct sysent *callp;
@@ -646,11 +648,9 @@
callp = rump_sysent + num;
l = curlwp;
- if (iamtheserver)
- curproc->p_vmspace = &sp_vmspace;
+ curproc->p_vmspace = &sp_vmspace;
rv = sy_call(callp, l, (void *)arg, retval);
- if (iamtheserver)
- curproc->p_vmspace = vmspace_kernel();
+ curproc->p_vmspace = vmspace_kernel();
return rv;
}