Don't autogenerate the wrapper that is called from the rump kernel
local syscall entry points. The wrapper is now so big that it doesn't get inlined (original intent for having it close to the entry points), and autogenerating a regular function just loses in flexibility.
This commit is contained in:
parent
b85d7b17d8
commit
31b175eb03
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: makesyscalls.sh,v 1.129 2013/08/15 21:16:13 pooka Exp $
|
||||
# $NetBSD: makesyscalls.sh,v 1.130 2013/09/03 19:55:13 pooka Exp $
|
||||
#
|
||||
# Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
|
@ -245,21 +245,8 @@ NR == 1 {
|
|||
printf "#include <sys/syscallvar.h>\n\n" > rumpcalls
|
||||
printf "#include <rump/rumpuser.h>\n" > rumpcalls
|
||||
printf "#include \"rump_private.h\"\n\n" > rumpcalls
|
||||
printf "static int\nrsys_syscall" > rumpcalls
|
||||
printf "(int num, void *data, size_t dlen, register_t *retval)" > rumpcalls
|
||||
printf "\n{\n\tstruct proc *p;\n" > rumpcalls
|
||||
printf "\tstruct emul *e;\n" > rumpcalls
|
||||
printf "\tstruct sysent *callp;\n" > rumpcalls
|
||||
printf "\tint rv;\n\n" > rumpcalls
|
||||
printf "\trump_schedule();\n" > rumpcalls
|
||||
printf "\tp = curproc;\n" > rumpcalls
|
||||
printf "\te = p->p_emul;\n" > rumpcalls
|
||||
printf "#ifndef __HAVE_MINIMAL_EMUL\n" > rumpcalls
|
||||
printf "\tKASSERT(num > 0 && num < e->e_nsysent);\n" > rumpcalls
|
||||
printf "#endif\n" > rumpcalls
|
||||
printf "\tcallp = e->e_sysent + num;\n\n" > rumpcalls
|
||||
printf "\trv = sy_call(callp, curlwp, data, retval);\n" > rumpcalls
|
||||
printf "\trump_unschedule();\n\n\treturn rv;\n}\n\n" > rumpcalls
|
||||
printf "#define rsys_syscall(num, data, dlen, retval)\t\\\n" > rumpcalls
|
||||
printf " rump_syscall(num, data, dlen, retval)\n\n" > rumpcalls
|
||||
printf "#define rsys_seterrno(error) rumpuser_seterrno(error)\n" > rumpcalls
|
||||
printf "#define rsys_alias(a,b) __weak_alias(a,b);\n#endif\n\n" > rumpcalls
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump.c,v 1.271 2013/07/03 17:10:28 njoly Exp $ */
|
||||
/* $NetBSD: rump.c,v 1.272 2013/09/03 19:55:13 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.271 2013/07/03 17:10:28 njoly Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.272 2013/09/03 19:55:13 pooka Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#define ELFSIZE ARCH_ELFSIZE
|
||||
|
@ -982,3 +982,25 @@ rump_xc_highpri(struct cpu_info *ci)
|
|||
else
|
||||
xc_broadcast(0, ipiemu, NULL, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
rump_syscall(int num, void *data, size_t dlen, register_t *retval)
|
||||
{
|
||||
struct proc *p;
|
||||
struct emul *e;
|
||||
struct sysent *callp;
|
||||
int rv;
|
||||
|
||||
rump_schedule();
|
||||
p = curproc;
|
||||
e = p->p_emul;
|
||||
#ifndef __HAVE_MINIMAL_EMUL
|
||||
KASSERT(num > 0 && num < e->e_nsysent);
|
||||
#endif
|
||||
callp = e->e_sysent + num;
|
||||
|
||||
rv = sy_call(callp, curlwp, data, retval);
|
||||
rump_unschedule();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump_private.h,v 1.74 2013/03/10 16:51:31 pooka Exp $ */
|
||||
/* $NetBSD: rump_private.h,v 1.75 2013/09/03 19:55:13 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
|
||||
|
@ -118,6 +118,7 @@ void rump_schedule_cpu_interlock(struct lwp *, void *);
|
|||
void rump_unschedule_cpu(struct lwp *);
|
||||
void rump_unschedule_cpu_interlock(struct lwp *, void *);
|
||||
void rump_unschedule_cpu1(struct lwp *, void *);
|
||||
int rump_syscall(int, void *, size_t, register_t *);
|
||||
|
||||
void rump_schedlock_cv_wait(struct rumpuser_cv *);
|
||||
int rump_schedlock_cv_timedwait(struct rumpuser_cv *,
|
||||
|
|
Loading…
Reference in New Issue