diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/fs/msdosfs/msdosfs_denode.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_denode.c')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index bf176bd..8ab7f11 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -125,7 +125,7 @@ msdosfs_hashget(dev, dirclust, diroff) u_long dirclust; u_long diroff; { - struct proc *p = curproc; /* XXX */ + struct thread *td = curthread; /* XXX */ struct denode *dep; struct vnode *vp; @@ -139,7 +139,7 @@ loop: vp = DETOV(dep); mtx_lock(&vp->v_interlock); mtx_unlock(&dehash_mtx); - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) goto loop; return (dep); } @@ -209,7 +209,7 @@ deget(pmp, dirclust, diroffset, depp) struct denode *ldep; struct vnode *nvp; struct buf *bp; - struct proc *p = curproc; /* XXX */ + struct thread *td = curthread; /* XXX */ struct timeval tv; #ifdef MSDOSFS_DEBUG @@ -278,7 +278,7 @@ deget(pmp, dirclust, diroffset, depp) * of at the start of msdosfs_hashins() so that reinsert() can * call msdosfs_hashins() with a locked denode. */ - if (VOP_LOCK(nvp, LK_EXCLUSIVE, p) != 0) + if (VOP_LOCK(nvp, LK_EXCLUSIVE, td) != 0) panic("deget: unexpected lock failure"); /* @@ -414,12 +414,12 @@ deupdat(dep, waitfor) * Truncate the file described by dep to the length specified by length. */ int -detrunc(dep, length, flags, cred, p) +detrunc(dep, length, flags, cred, td) struct denode *dep; u_long length; int flags; struct ucred *cred; - struct proc *p; + struct thread *td; { int error; int allerror; @@ -520,7 +520,7 @@ detrunc(dep, length, flags, cred, p) dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE|DE_MODIFIED; - allerror = vtruncbuf(DETOV(dep), cred, p, length, pmp->pm_bpcluster); + allerror = vtruncbuf(DETOV(dep), cred, td, length, pmp->pm_bpcluster); #ifdef MSDOSFS_DEBUG if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); @@ -671,12 +671,12 @@ int msdosfs_inactive(ap) struct vop_inactive_args /* { struct vnode *a_vp; - struct proc *a_p; + struct thread *a_td; } */ *ap; { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); - struct proc *p = ap->a_p; + struct thread *td = ap->a_td; int error = 0; #ifdef MSDOSFS_DEBUG @@ -702,14 +702,14 @@ msdosfs_inactive(ap) dep, dep->de_refcnt, vp->v_mount->mnt_flag, MNT_RDONLY); #endif if (dep->de_refcnt <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { - error = detrunc(dep, (u_long) 0, 0, NOCRED, p); + error = detrunc(dep, (u_long) 0, 0, NOCRED, td); dep->de_flag |= DE_UPDATE; dep->de_Name[0] = SLOT_DELETED; } deupdat(dep, 0); out: - VOP_UNLOCK(vp, 0, p); + VOP_UNLOCK(vp, 0, td); /* * If we are done with the denode, reclaim it * so that it can be reused immediately. @@ -719,6 +719,6 @@ out: dep->de_Name[0]); #endif if (dep->de_Name[0] == SLOT_DELETED) - vrecycle(vp, NULL, p); + vrecycle(vp, NULL, td); return (error); } |