Module Name: src
Committed By: pooka
Date: Thu Oct 15 16:41:08 UTC 2009
Modified Files:
src/lib/libp2k: p2k.c
src/lib/libukfs: ukfs.c
Log Message:
use newstyle rump lwp interfaces
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libp2k/p2k.c
cvs rdiff -u -r1.40 -r1.41 src/lib/libukfs/ukfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.23 src/lib/libp2k/p2k.c:1.24
--- src/lib/libp2k/p2k.c:1.23 Wed Oct 14 18:22:50 2009
+++ src/lib/libp2k/p2k.c Thu Oct 15 16:41:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: p2k.c,v 1.23 2009/10/14 18:22:50 pooka Exp $ */
+/* $NetBSD: p2k.c,v 1.24 2009/10/15 16:41:08 pooka Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -126,7 +126,7 @@
cred = cred_create(pcn->pcn_cred);
/* LINTED: prehistoric types in first two args */
return rump_pub_makecn(pcn->pcn_nameiop, pcn->pcn_flags | myflags,
- pcn->pcn_name, pcn->pcn_namelen, cred, rump_pub_get_curlwp());
+ pcn->pcn_name, pcn->pcn_namelen, cred, rump_pub_lwp_curlwp());
}
static __inline void
@@ -143,7 +143,7 @@
lwpid_t lid;
puffs_cc_getcaller(puffs_cc_getcc(pu), &pid, &lid);
- rump_pub_setup_curlwp(pid, lid, 1);
+ rump_pub_lwp_alloc_and_switch(pid, lid);
}
/*ARGSUSED*/
@@ -151,7 +151,7 @@
clearlwp(struct puffs_usermount *pu)
{
- rump_pub_clear_curlwp();
+ rump_pub_lwp_release(rump_pub_lwp_curlwp());
}
static __inline struct p2k_vp_hash *
@@ -467,7 +467,7 @@
struct p2k_mount *p2m = ukfs_getspecific(fs);
int error = 0;
- rump_pub_clear_curlwp(); /* ukfs does its own curlwp tricks */
+ rump_pub_lwp_release(rump_pub_lwp_curlwp()); /* ukfs & curlwp tricks */
rump_pub_vp_rele(p2m->p2m_rvp);
if (ukfs_release(fs, 0) != 0) {
@@ -476,7 +476,7 @@
}
p2m->p2m_ukfs = NULL;
- rump_pub_setup_curlwp(0, 1, 1);
+ rump_pub_lwp_alloc_and_switch(0, 0);
return error;
}
Index: src/lib/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.40 src/lib/libukfs/ukfs.c:1.41
--- src/lib/libukfs/ukfs.c:1.40 Wed Oct 14 18:22:50 2009
+++ src/lib/libukfs/ukfs.c Thu Oct 15 16:41:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ukfs.c,v 1.40 2009/10/14 18:22:50 pooka Exp $ */
+/* $NetBSD: ukfs.c,v 1.41 2009/10/15 16:41:08 pooka Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -141,7 +141,7 @@
{
struct vnode *rvp, *cvp;
- rump_pub_setup_curlwp(nextpid(ukfs), 1, 1);
+ rump_pub_lwp_alloc_and_switch(nextpid(ukfs), 1);
rvp = ukfs_getrvp(ukfs);
pthread_spin_lock(&ukfs->ukfs_spin);
cvp = ukfs->ukfs_cdir;
@@ -158,7 +158,7 @@
rvp = ukfs_getrvp(ukfs);
rump_pub_rcvp_set(NULL, rvp);
rump_pub_vp_rele(rvp);
- rump_pub_clear_curlwp();
+ rump_pub_lwp_release(rump_pub_lwp_curlwp());
}
int
@@ -435,19 +435,19 @@
mntflag = 0;
if (flags & UKFS_RELFLAG_FORCE)
mntflag = MNT_FORCE;
- rump_pub_setup_curlwp(nextpid(fs), 1, 1);
+ rump_pub_lwp_alloc_and_switch(nextpid(fs), 1);
rump_pub_vp_rele(fs->ukfs_rvp);
fs->ukfs_rvp = NULL;
rv = rump_sys_unmount(fs->ukfs_mountpath, mntflag);
if (rv == -1) {
error = errno;
rump_pub_vfs_root(fs->ukfs_mp, &fs->ukfs_rvp, 0);
- rump_pub_clear_curlwp();
+ rump_pub_lwp_release(rump_pub_lwp_curlwp());
ukfs_chdir(fs, fs->ukfs_mountpath);
errno = error;
return -1;
}
- rump_pub_clear_curlwp();
+ rump_pub_lwp_release(rump_pub_lwp_curlwp());
}
if (fs->ukfs_devpath) {