Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib use newstyle rump lwp interfaces
details: https://anonhg.NetBSD.org/src/rev/ce5d43b14edd
branches: trunk
changeset: 748181:ce5d43b14edd
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Oct 15 16:41:08 2009 +0000
description:
use newstyle rump lwp interfaces
diffstat:
lib/libp2k/p2k.c | 12 ++++++------
lib/libukfs/ukfs.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (104 lines):
diff -r 49d24b90ee02 -r ce5d43b14edd lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c Thu Oct 15 16:40:15 2009 +0000
+++ b/lib/libp2k/p2k.c Thu Oct 15 16:41:08 2009 +0000
@@ -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;
}
diff -r 49d24b90ee02 -r ce5d43b14edd lib/libukfs/ukfs.c
--- a/lib/libukfs/ukfs.c Thu Oct 15 16:40:15 2009 +0000
+++ b/lib/libukfs/ukfs.c Thu Oct 15 16:41:08 2009 +0000
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index