Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump Adjust rump sources for external/internal interfaces.
details: https://anonhg.NetBSD.org/src/rev/648ddee40426
branches: trunk
changeset: 748120:648ddee40426
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Oct 14 17:29:19 2009 +0000
description:
Adjust rump sources for external/internal interfaces.
No functional change.
diffstat:
sys/rump/fs/lib/libsyspuffs/Makefile | 4 +-
sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c | 8 +-
sys/rump/include/rump/Makefile | 4 +-
sys/rump/include/rump/rump.h | 121 ++++++-------------------
sys/rump/librump/rumpkern/Makefile.rumpkern | 4 +-
sys/rump/librump/rumpkern/arch/i386/rumpcpu.c | 6 +-
sys/rump/librump/rumpkern/emul.c | 10 +-
sys/rump/librump/rumpkern/rump.c | 61 +++++-------
sys/rump/librump/rumpkern/rump_private.h | 26 +++++-
sys/rump/librump/rumpkern/sysproxy_socket.c | 15 +-
sys/rump/librump/rumpnet/Makefile.rumpnet | 4 +-
sys/rump/librump/rumpnet/rump_net_private.h | 4 +-
sys/rump/librump/rumpvfs/Makefile.rumpvfs | 4 +-
sys/rump/librump/rumpvfs/compat.c | 14 +-
sys/rump/librump/rumpvfs/rump_vfs.c | 59 ++++++------
sys/rump/librump/rumpvfs/rump_vfs_private.h | 8 +-
sys/rump/librump/rumpvfs/rumpfs.c | 10 +-
sys/rump/net/lib/libvirtif/if_virt.c | 6 +-
sys/rump/net/rumptest/Makefile | 4 +-
19 files changed, 173 insertions(+), 199 deletions(-)
diffs (truncated from 1115 to 300 lines):
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/fs/lib/libsyspuffs/Makefile
--- a/sys/rump/fs/lib/libsyspuffs/Makefile Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/fs/lib/libsyspuffs/Makefile Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2008/07/29 13:17:43 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2009/10/14 17:29:19 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../fs/puffs
@@ -11,7 +11,7 @@
SRCS+= puffs_rumpglue.c
-CPPFLAGS+= -DPUFFSDEBUG -DPUTTERDEBUG
+CPPFLAGS+= -DPUFFSDEBUG -DPUTTERDEBUG -I${RUMPTOP}/librump/rumpvfs
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c
--- a/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_rumpglue.c,v 1.9 2009/01/08 03:27:10 pooka Exp $ */
+/* $NetBSD: puffs_rumpglue.c,v 1.10 2009/10/14 17:29:19 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.9 2009/01/08 03:27:10 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.10 2009/10/14 17:29:19 pooka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -44,6 +44,8 @@
#include <rump/rump.h>
#include <rump/rumpuser.h>
+#include "rump_vfs_private.h"
+
void putterattach(void); /* XXX: from autoconf */
dev_type_open(puttercdopen);
@@ -161,7 +163,7 @@
}
int
-rump_syspuffs_glueinit(int fd, int *newfd)
+rumppriv_syspuffs_glueinit(int fd, int *newfd)
{
struct ptargs *pap;
int rv;
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/include/rump/Makefile
--- a/sys/rump/include/rump/Makefile Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/include/rump/Makefile Wed Oct 14 17:29:19 2009 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2008/11/17 08:54:39 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2009/10/14 17:29:19 pooka Exp $
INCSDIR= /usr/include/rump
INCS= rump.h rump_namei.h rump_syscalls.h rumpdefs.h rumpuser.h
INCS+= rumpvnode_if.h
+INCS+= rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h
+
.include <bsd.kinc.mk>
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/include/rump/rump.h
--- a/sys/rump/include/rump/rump.h Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/include/rump/rump.h Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.h,v 1.30 2009/10/13 20:08:08 pooka Exp $ */
+/* $NetBSD: rump.h,v 1.31 2009/10/14 17:29:19 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -62,108 +62,43 @@
#include <rump/rumpvnode_if.h>
#include <rump/rumpdefs.h>
+/* rumpkern */
+enum rump_uiorw { RUMPUIO_READ, RUMPUIO_WRITE };
+typedef int (*rump_sysproxy_t)(int, void *, uint8_t *, size_t, register_t *);
+#define rump_cred_suserput(c) rump_cred_put(c)
+/* COMPAT_NETHACK */
+#define WizardMode() rump_cred_suserget()
+#define YASD(cred) rump_cred_suserput(cred)
+
+/* rumpvfs */
+#define RUMPCN_FREECRED 0x02
+#define RUMPCN_FORCEFREE 0x04
+#define RUMP_ETFS_SIZE_ENDOFF ((uint64_t)-1)
+enum rump_etfs_type { RUMP_ETFS_REG, RUMP_ETFS_BLK, RUMP_ETFS_CHR };
+
/*
* Something like rump capabilities would be nicer, but let's
* do this for a start.
*/
#define RUMP_VERSION 01
#define rump_init() rump__init(RUMP_VERSION)
-int rump_module_init(struct modinfo *, prop_dictionary_t props);
-int rump_module_fini(struct modinfo *);
-
-int rump__init(int);
-void rump_reboot(int);
-int rump_getversion(void);
-
-struct componentname *rump_makecn(u_long, u_long, const char *, size_t,
- kauth_cred_t, struct lwp *);
-void rump_freecn(struct componentname *, int);
-#define RUMPCN_FREECRED 0x02
-#define RUMPCN_FORCEFREE 0x04
-int rump_checksavecn(struct componentname *);
-int rump_namei(uint32_t, uint32_t, const char *,
- struct vnode **, struct vnode **,
- struct componentname **);
-
-void rump_getvninfo(struct vnode *, enum vtype *, off_t * /*XXX*/, dev_t *);
-enum rump_etfs_type { RUMP_ETFS_REG, RUMP_ETFS_BLK, RUMP_ETFS_CHR };
-#define RUMP_ETFS_SIZE_ENDOFF ((uint64_t)-1)
-int rump_etfs_register(const char *, const char *, enum rump_etfs_type);
-int rump_etfs_register_withsize(const char *, const char *,
- enum rump_etfs_type, uint64_t, uint64_t);
-int rump_etfs_remove(const char *);
-
-struct vfsops *rump_vfslist_iterate(struct vfsops *);
-struct vfsops *rump_vfs_getopsbyname(const char *);
+/* um, what's the point ?-) */
+#ifdef _BEGIN_DECLS
+_BEGIN_DECLS
+#endif
-struct vattr *rump_vattr_init(void);
-void rump_vattr_settype(struct vattr *, enum vtype);
-void rump_vattr_setmode(struct vattr *, mode_t);
-void rump_vattr_setrdev(struct vattr *, dev_t);
-void rump_vattr_free(struct vattr *);
-
-void rump_vp_incref(struct vnode *);
-int rump_vp_getref(struct vnode *);
-void rump_vp_rele(struct vnode *);
-
-enum rump_uiorw { RUMPUIO_READ, RUMPUIO_WRITE };
-struct uio *rump_uio_setup(void *, size_t, off_t, enum rump_uiorw);
-size_t rump_uio_getresid(struct uio *);
-off_t rump_uio_getoff(struct uio *);
-size_t rump_uio_free(struct uio *);
-
-void rump_vp_interlock(struct vnode *);
+int rump__init(int);
-kauth_cred_t rump_cred_create(uid_t, gid_t, size_t, gid_t *);
-kauth_cred_t rump_cred_suserget(void);
-void rump_cred_put(kauth_cred_t);
-
-#define rump_cred_suserput(c) rump_cred_put(c)
-/* COMPAT_NETHACK */
-#define WizardMode() rump_cred_suserget()
-#define YASD(cred) rump_cred_suserput(cred)
-
-int rump_vfs_unmount(struct mount *, int);
-int rump_vfs_root(struct mount *, struct vnode **, int);
-int rump_vfs_statvfs(struct mount *, struct statvfs *);
-int rump_vfs_sync(struct mount *, int, kauth_cred_t);
-int rump_vfs_fhtovp(struct mount *, struct fid *, struct vnode **);
-int rump_vfs_vptofh(struct vnode *, struct fid *, size_t *);
-void rump_vfs_syncwait(struct mount *);
-int rump_vfs_getmp(const char *, struct mount **);
-
-struct lwp *rump_newproc_switch(void);
-struct lwp *rump_setup_curlwp(pid_t, lwpid_t, int);
-struct lwp *rump_get_curlwp(void);
-void rump_set_curlwp(struct lwp *);
-void rump_clear_curlwp(void);
+#ifndef _RUMPKERNEL
+#include <rump/rumpkern_if_pub.h>
+#include <rump/rumpvfs_if_pub.h>
+#include <rump/rumpnet_if_pub.h>
+#endif
-void rump_rcvp_set(struct vnode *, struct vnode *);
-struct vnode *rump_cdir_get(void);
-
-/* I picked the wrong header to stop sniffin' glue */
-int rump_syspuffs_glueinit(int, int *);
-
-int rump_virtif_create(int);
-
-typedef int (*rump_sysproxy_t)(int, void *, uint8_t *, size_t, register_t *);
-int rump_sysproxy_set(rump_sysproxy_t, void *);
-int rump_sysproxy_socket_setup_client(int);
-int rump_sysproxy_socket_setup_server(int);
-
-/*
- * compat syscalls. these are currently hand-"generated"
- */
-int rump_sys___stat30(const char *, struct stat *);
-int rump_sys___lstat30(const char *, struct stat *);
-
-/*
- * Other compat glue (for sniffing purposes)
- * XXX: (lack of) types
- */
-void rump_vattr50_to_vattr(const struct vattr *, struct vattr *);
-void rump_vattr_to_vattr50(const struct vattr *, struct vattr *);
+#ifdef _END_DECLS
+_END_DECLS
+#endif
/*
* Begin rump syscall conditionals. Yes, something a little better
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.50 2009/10/02 18:50:15 elad Exp $
+# $NetBSD: Makefile.rumpkern,v 1.51 2009/10/14 17:29:19 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -17,6 +17,8 @@
SRCS= rump.c emul.c intr.c locks.c ltsleep.c percpu.c pool.c \
sleepq.c sysproxy_socket.c vm.c
+SRCS+= rumpkern_if_wrappers.c
+
# stubs
#
SRCS+= misc_stub.c pmap_stub.c
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/librump/rumpkern/arch/i386/rumpcpu.c
--- a/sys/rump/librump/rumpkern/arch/i386/rumpcpu.c Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/librump/rumpkern/arch/i386/rumpcpu.c Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpcpu.c,v 1.3 2009/03/18 10:22:45 cegger Exp $ */
+/* $NetBSD: rumpcpu.c,v 1.4 2009/10/14 17:29:19 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpcpu.c,v 1.3 2009/03/18 10:22:45 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpcpu.c,v 1.4 2009/10/14 17:29:19 pooka Exp $");
#include <sys/param.h>
@@ -50,7 +50,7 @@
x86_curlwp()
{
- return rump_get_curlwp();
+ return rumppriv_get_curlwp();
}
void
diff -r 5666d88c20f5 -r 648ddee40426 sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c Wed Oct 14 17:28:13 2009 +0000
+++ b/sys/rump/librump/rumpkern/emul.c Wed Oct 14 17:29:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emul.c,v 1.98 2009/10/09 14:41:36 pooka Exp $ */
+/* $NetBSD: emul.c,v 1.99 2009/10/14 17:29:19 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.98 2009/10/09 14:41:36 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.99 2009/10/14 17:29:19 pooka Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -439,7 +439,7 @@
k = kmem_alloc(sizeof(struct kthdesc), KM_SLEEP);
k->f = func;
k->arg = arg;
- k->mylwp = l = rump_setup_curlwp(0, rump_nextlid(), 0);
+ k->mylwp = l = rumppriv_setup_curlwp(0, rump_nextlid(), 0);
if (flags & KTHREAD_MPSAFE)
l->l_pflag |= LP_MPSAFE;
rv = rumpuser_thread_create(threadbouncer, k, thrname);
@@ -457,7 +457,7 @@
if ((curlwp->l_pflag & LP_MPSAFE) == 0)
KERNEL_UNLOCK_ONE(NULL);
- rump_clear_curlwp();
+ rumppriv_clear_curlwp();
rumpuser_thread_exit();
}
@@ -731,7 +731,7 @@
cpu_reboot(int howto, char *bootstr)
{
- rump_reboot(howto);
Home |
Main Index |
Thread Index |
Old Index