Missed a few symbols in previous ...

Also, reorganize rumpuser header inclusion to make sure problem is
caught already by the compiler.
This commit is contained in:
pooka 2010-11-01 13:55:19 +00:00
parent 8fc7f9077e
commit 5629968a95
3 changed files with 22 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser_sp.c,v 1.3 2010/11/01 13:49:10 pooka Exp $ */
/* $NetBSD: rumpuser_sp.c,v 1.4 2010/11/01 13:55:19 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: rumpuser_sp.c,v 1.3 2010/11/01 13:49:10 pooka Exp $");
__RCSID("$NetBSD: rumpuser_sp.c,v 1.4 2010/11/01 13:55:19 pooka Exp $");
#include <sys/types.h>
#include <sys/mman.h>
@ -59,12 +59,12 @@ __RCSID("$NetBSD: rumpuser_sp.c,v 1.3 2010/11/01 13:49:10 pooka Exp $");
#include <string.h>
#include <unistd.h>
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
#include <rump/rumpuser.h>
//#define DEBUG
#ifdef DEBUG
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
#define DPRINTF(x) mydprintf x
static void
mydprintf(const char *fmt, ...)
@ -161,18 +161,18 @@ static void
lwproc_switch(struct lwp *l)
{
rump_schedule();
spops.spop_schedule();
spops.spop_lwproc_switch(l);
rump_unschedule();
spops.spop_unschedule();
}
static void
lwproc_release(void)
{
rump_schedule();
spops.spop_schedule();
spops.spop_lwproc_release();
rump_unschedule();
spops.spop_unschedule();
}
static int
@ -180,9 +180,9 @@ lwproc_newproc(void)
{
int rv;
rump_schedule();
spops.spop_schedule();
rv = spops.spop_lwproc_newproc();
rump_unschedule();
spops.spop_unschedule();
return rv;
}
@ -192,9 +192,9 @@ lwproc_curlwp(void)
{
struct lwp *l;
rump_schedule();
spops.spop_schedule();
l = spops.spop_lwproc_curlwp();
rump_unschedule();
spops.spop_unschedule();
return l;
}
@ -204,9 +204,9 @@ rumpsyscall(int sysnum, void *data, register_t *retval)
{
int rv;
rump_schedule();
spops.spop_schedule();
rv = spops.spop_syscall(sysnum, data, retval);
rump_unschedule();
spops.spop_unschedule();
return rv;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser.h,v 1.47 2010/11/01 13:49:10 pooka Exp $ */
/* $NetBSD: rumpuser.h,v 1.48 2010/11/01 13:55:19 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -205,6 +205,9 @@ void rumpuser_dl_component_init(int, rump_component_init_fn);
/* syscall proxy routines */
struct rumpuser_sp_ops {
void (*spop_schedule)(void);
void (*spop_unschedule)(void);
void (*spop_lwproc_switch)(struct lwp *);
void (*spop_lwproc_release)(void);
int (*spop_lwproc_newproc)(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.c,v 1.194 2010/11/01 13:49:10 pooka Exp $ */
/* $NetBSD: rump.c,v 1.195 2010/11/01 13:55:20 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.194 2010/11/01 13:49:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.195 2010/11/01 13:55:20 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@ -208,6 +208,8 @@ rump__init(int rump_version)
rump_inited = 1;
/* Check our role as a rump proxy */
spops.spop_schedule = rump_schedule;
spops.spop_unschedule = rump_unschedule;
spops.spop_lwproc_switch = rump_lwproc_switch;
spops.spop_lwproc_release = rump_lwproc_releaselwp;
spops.spop_lwproc_newproc = rump_lwproc_newproc;