Use tsleep() rather than sleep so that 'ps' is more informative about

the wait.
This commit is contained in:
David Greenman 1994-10-06 21:07:04 +00:00
parent f5729156af
commit 824789192c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3396
31 changed files with 86 additions and 86 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_node.c,v 1.5 1994/09/22 19:37:43 wollman Exp $
* $Id: cd9660_node.c,v 1.6 1994/09/26 00:32:56 gpalmer Exp $
*/
#include <sys/param.h>
@ -196,7 +196,7 @@ loop:
continue;
if ((ip->i_flag&ILOCKED) != 0) {
ip->i_flag |= IWANT;
sleep((caddr_t)ip, PINOD);
(void) tsleep((caddr_t)ip, PINOD, "isoigt", 0);
goto loop;
}
if (vget(ITOV(ip), 1))
@ -422,7 +422,7 @@ iso_ilock(ip)
if (ip->i_spare0 == curproc->p_pid)
panic("locking against myself");
ip->i_spare1 = curproc->p_pid;
(void) sleep((caddr_t)ip, PINOD);
(void) tsleep((caddr_t)ip, PINOD, "isoilk", 0);
}
ip->i_spare1 = 0;
ip->i_spare0 = curproc->p_pid;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
* $Id: dead_vnops.c,v 1.3 1994/08/02 07:44:51 davidg Exp $
* $Id: dead_vnops.c,v 1.4 1994/09/21 03:46:52 wollman Exp $
*/
#include <sys/param.h>
@ -365,7 +365,7 @@ chkvnlock(vp)
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "ckvnlk", 0);
locked = 1;
}
return (locked);

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.5 1994/09/21 03:46:56 wollman Exp $
* $Id: fdesc_vnops.c,v 1.6 1994/10/02 17:47:51 phk Exp $
*/
/*
@ -140,7 +140,7 @@ loop:
*/
if (fdcache_lock & FDL_LOCKED) {
fdcache_lock |= FDL_WANT;
sleep((caddr_t) &fdcache_lock, PINOD);
(void) tsleep((caddr_t) &fdcache_lock, PINOD, "fdalvp", 0);
goto loop;
}
fdcache_lock |= FDL_LOCKED;

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_denode.c,v 1.1 1994/09/19 15:41:41 dfr Exp $ */
/* $Id: msdosfs_denode.c,v 1.2 1994/09/27 20:42:44 phk Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
/*-
@ -96,7 +96,7 @@ msdosfs_hashget(dev, dirclust, diroff)
continue;
if (dep->de_flag & DE_LOCKED) {
dep->de_flag |= DE_WANTED;
sleep((caddr_t)dep, PINOD);
(void) tsleep((caddr_t)dep, PINOD, "msdhgt", 0);
break;
}
if (!vget(DETOV(dep), 1))

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.3 1994/09/27 20:42:56 phk Exp $ */
/* $Id: msdosfs_vnops.c,v 1.4 1994/09/28 16:45:14 dfr Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@ -1714,7 +1714,7 @@ msdosfs_lock(ap)
if (dep->de_lockholder == curproc->p_pid)
panic("msdosfs_lock: locking against myself");
dep->de_lockwaiter = curproc->p_pid;
(void) sleep((caddr_t) dep, PINOD);
(void) tsleep((caddr_t) dep, PINOD, "msdlck", 0);
}
dep->de_lockwaiter = 0;
dep->de_lockholder = curproc->p_pid;

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_subr.c 8.4 (Berkeley) 1/27/94
*
* $Id: procfs_subr.c,v 1.1.1.1 1994/05/24 10:05:08 rgrimes Exp $
* $Id: procfs_subr.c,v 1.2 1994/08/02 07:45:21 davidg Exp $
*/
#include <sys/param.h>
@ -106,7 +106,7 @@ loop:
*/
if (pfsvplock & PROCFS_LOCKED) {
pfsvplock |= PROCFS_WANT;
sleep((caddr_t) &pfsvplock, PINOD);
(void) tsleep((caddr_t) &pfsvplock, PINOD, "pfsavp", 0);
goto loop;
}
pfsvplock |= PROCFS_LOCKED;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.4 1994/08/08 09:11:36 davidg Exp $
* $Id: spec_vnops.c,v 1.5 1994/09/21 03:47:09 wollman Exp $
*/
#include <sys/param.h>
@ -465,7 +465,7 @@ loop:
if (ap->a_waitfor == MNT_WAIT) {
while (vp->v_numoutput) {
vp->v_flag |= VBWAIT;
sleep((caddr_t)&vp->v_numoutput, PRIBIO + 1);
(void) tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1, "spfsyn", 0);
}
#ifdef DIAGNOSTIC
if (vp->v_dirtyblkhd.lh_first) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.4 (Berkeley) 2/17/94
* $Id$
* $Id: union_subr.c,v 1.3 1994/08/02 07:45:44 davidg Exp $
*/
#include <sys/param.h>
@ -80,7 +80,7 @@ union_list_lock(ix)
if (unvplock[ix] & UN_LOCKED) {
unvplock[ix] |= UN_WANT;
sleep((caddr_t) &unvplock[ix], PINOD);
(void) tsleep((caddr_t) &unvplock[ix], PINOD, "unllck", 0);
return (1);
}
@ -311,7 +311,7 @@ loop:
if (un->un_flags & UN_LOCKED) {
vrele(UNIONTOV(un));
un->un_flags |= UN_WANT;
sleep((caddr_t) &un->un_flags, PINOD);
(void) tsleep((caddr_t) &un->un_flags, PINOD, "unalvp", 0);
goto loop;
}
un->un_flags |= UN_LOCKED;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vnops.c 8.6 (Berkeley) 2/17/94
* $Id: union_vnops.c,v 1.4 1994/09/21 03:47:14 wollman Exp $
* $Id: union_vnops.c,v 1.5 1994/09/21 23:22:45 wollman Exp $
*/
#include <sys/param.h>
@ -128,7 +128,7 @@ union_lookup1(udvp, dvp, vpp, cnp)
if (mp->mnt_flag & MNT_MLOCK) {
mp->mnt_flag |= MNT_MWAIT;
sleep((caddr_t) mp, PVFS);
(void) tsleep((caddr_t) mp, PVFS, "unlkup", 0);
continue;
}
@ -1253,7 +1253,7 @@ union_lock(ap)
start:
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "unnlk1", 0);
}
un = VTOUNION(vp);
@ -1276,7 +1276,7 @@ start:
panic("union: locking against myself");
#endif
un->un_flags |= UN_WANT;
sleep((caddr_t) &un->un_flags, PINOD);
(void) tsleep((caddr_t) &un->un_flags, PINOD, "unnlk2", 0);
goto start;
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.4 (Berkeley) 12/30/93
* $Id$
* $Id: ufs_ihash.c,v 1.2 1994/08/02 07:54:55 davidg Exp $
*/
#include <sys/param.h>
@ -100,7 +100,7 @@ ufs_ihashget(device, inum)
if (inum == ip->i_number && device == ip->i_dev) {
if (ip->i_flag & IN_LOCKED) {
ip->i_flag |= IN_WANTED;
sleep(ip, PINOD);
(void) tsleep(ip, PINOD, "uihget", 0);
break;
}
vp = ITOV(ip);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_node.c,v 1.5 1994/09/22 19:37:43 wollman Exp $
* $Id: cd9660_node.c,v 1.6 1994/09/26 00:32:56 gpalmer Exp $
*/
#include <sys/param.h>
@ -196,7 +196,7 @@ loop:
continue;
if ((ip->i_flag&ILOCKED) != 0) {
ip->i_flag |= IWANT;
sleep((caddr_t)ip, PINOD);
(void) tsleep((caddr_t)ip, PINOD, "isoigt", 0);
goto loop;
}
if (vget(ITOV(ip), 1))
@ -422,7 +422,7 @@ iso_ilock(ip)
if (ip->i_spare0 == curproc->p_pid)
panic("locking against myself");
ip->i_spare1 = curproc->p_pid;
(void) sleep((caddr_t)ip, PINOD);
(void) tsleep((caddr_t)ip, PINOD, "isoilk", 0);
}
ip->i_spare1 = 0;
ip->i_spare0 = curproc->p_pid;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
* $Id: kern_sysctl.c,v 1.15 1994/09/23 19:07:17 wollman Exp $
* $Id: kern_sysctl.c,v 1.16 1994/10/02 17:35:19 phk Exp $
*/
/*
@ -144,7 +144,7 @@ __sysctl(p, uap, retval)
return (EFAULT);
while (memlock.sl_lock) {
memlock.sl_want = 1;
sleep((caddr_t)&memlock, PRIBIO+1);
(void) tsleep((caddr_t)&memlock, PRIBIO+1, "sysctl", 0);
memlock.sl_locked++;
}
memlock.sl_lock = 1;

View File

@ -1,4 +1,4 @@
/* $Id: sysv_sem.c,v 1.2 1994/09/17 13:24:17 davidg Exp $ */
/* $Id: sysv_sem.c,v 1.3 1994/10/02 17:35:27 phk Exp $ */
/*
* Implementation of SVID semaphores
@ -58,7 +58,7 @@ semsys(p, uap, retval)
{
while (semlock_holder != NULL && semlock_holder != p)
sleep((caddr_t)&semlock_holder, (PZERO - 4));
(void) tsleep((caddr_t)&semlock_holder, (PZERO - 4), "semsys", 0);
if (uap->which >= sizeof(semcalls)/sizeof(semcalls[0]))
return (EINVAL);
@ -849,7 +849,7 @@ semexit(p)
#ifdef SEM_DEBUG
printf("semaphore facility locked - sleeping ...\n");
#endif
sleep((caddr_t)&semlock_holder, (PZERO - 4));
(void) tsleep((caddr_t)&semlock_holder, (PZERO - 4), "semext", 0);
}
did_something = 0;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
* $Id: tty.c,v 1.7 1994/10/02 17:35:29 phk Exp $
* $Id: tty.c,v 1.8 1994/10/03 01:12:18 ache Exp $
*/
#include <sys/param.h>
@ -1480,7 +1480,7 @@ ttycheckoutq(tp, wait)
timeout((void (*)__P((void *)))wakeup,
(void *)&tp->t_outq, hz);
SET(tp->t_state, TS_ASLEEP);
sleep((caddr_t)&tp->t_outq, PZERO - 1);
(void) tsleep((caddr_t)&tp->t_outq, PZERO - 1, "ttoutq", 0);
}
splx(s);
return (1);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.10 1994/10/02 17:35:38 phk Exp $
* $Id: vfs_subr.c,v 1.11 1994/10/05 09:48:22 davidg Exp $
*/
/*
@ -108,7 +108,7 @@ vfs_lock(mp)
while(mp->mnt_flag & MNT_MLOCK) {
mp->mnt_flag |= MNT_MWAIT;
sleep((caddr_t)mp, PVFS);
(void) tsleep((caddr_t)mp, PVFS, "vfslck", 0);
}
mp->mnt_flag |= MNT_MLOCK;
return (0);
@ -143,7 +143,7 @@ vfs_busy(mp)
while(mp->mnt_flag & MNT_MPBUSY) {
mp->mnt_flag |= MNT_MPWANT;
sleep((caddr_t)&mp->mnt_flag, PVFS);
(void) tsleep((caddr_t)&mp->mnt_flag, PVFS, "vfsbsy", 0);
}
if (mp->mnt_flag & MNT_UNMOUNT)
return (1);
@ -708,7 +708,7 @@ vget(vp, lockflag)
(vp->v_usecount == 0 &&
vp->v_freelist.tqe_prev == (struct vnode **)0xdeadb)) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vget", 0);
return (1);
}
if (vp->v_usecount == 0)
@ -966,7 +966,7 @@ vgoneall(vp)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vgall", 0);
return;
}
/*
@ -1010,7 +1010,7 @@ vgone(vp)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vgone", 0);
return;
}
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94
* $Id: vfs_lookup.c,v 1.4 1994/08/20 03:48:49 davidg Exp $
* $Id: vfs_lookup.c,v 1.5 1994/09/27 20:33:30 phk Exp $
*/
#include <sys/param.h>
@ -450,7 +450,7 @@ unionlookup:
(cnp->cn_flags & NOCROSSMOUNT) == 0) {
if (mp->mnt_flag & MNT_MLOCK) {
mp->mnt_flag |= MNT_MWAIT;
sleep((caddr_t)mp, PVFS);
(void) tsleep((caddr_t)mp, PVFS, "lookup", 0);
continue;
}
error = VFS_ROOT(dp->v_mountedhere, &tdp);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.10 1994/10/02 17:35:38 phk Exp $
* $Id: vfs_subr.c,v 1.11 1994/10/05 09:48:22 davidg Exp $
*/
/*
@ -108,7 +108,7 @@ vfs_lock(mp)
while(mp->mnt_flag & MNT_MLOCK) {
mp->mnt_flag |= MNT_MWAIT;
sleep((caddr_t)mp, PVFS);
(void) tsleep((caddr_t)mp, PVFS, "vfslck", 0);
}
mp->mnt_flag |= MNT_MLOCK;
return (0);
@ -143,7 +143,7 @@ vfs_busy(mp)
while(mp->mnt_flag & MNT_MPBUSY) {
mp->mnt_flag |= MNT_MPWANT;
sleep((caddr_t)&mp->mnt_flag, PVFS);
(void) tsleep((caddr_t)&mp->mnt_flag, PVFS, "vfsbsy", 0);
}
if (mp->mnt_flag & MNT_UNMOUNT)
return (1);
@ -708,7 +708,7 @@ vget(vp, lockflag)
(vp->v_usecount == 0 &&
vp->v_freelist.tqe_prev == (struct vnode **)0xdeadb)) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vget", 0);
return (1);
}
if (vp->v_usecount == 0)
@ -966,7 +966,7 @@ vgoneall(vp)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vgall", 0);
return;
}
/*
@ -1010,7 +1010,7 @@ vgone(vp)
*/
if (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "vgone", 0);
return;
}
/*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
* $Id: dead_vnops.c,v 1.3 1994/08/02 07:44:51 davidg Exp $
* $Id: dead_vnops.c,v 1.4 1994/09/21 03:46:52 wollman Exp $
*/
#include <sys/param.h>
@ -365,7 +365,7 @@ chkvnlock(vp)
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "ckvnlk", 0);
locked = 1;
}
return (locked);

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.5 1994/09/21 03:46:56 wollman Exp $
* $Id: fdesc_vnops.c,v 1.6 1994/10/02 17:47:51 phk Exp $
*/
/*
@ -140,7 +140,7 @@ loop:
*/
if (fdcache_lock & FDL_LOCKED) {
fdcache_lock |= FDL_WANT;
sleep((caddr_t) &fdcache_lock, PINOD);
(void) tsleep((caddr_t) &fdcache_lock, PINOD, "fdalvp", 0);
goto loop;
}
fdcache_lock |= FDL_LOCKED;

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_subr.c 8.4 (Berkeley) 1/27/94
*
* $Id: procfs_subr.c,v 1.1.1.1 1994/05/24 10:05:08 rgrimes Exp $
* $Id: procfs_subr.c,v 1.2 1994/08/02 07:45:21 davidg Exp $
*/
#include <sys/param.h>
@ -106,7 +106,7 @@ loop:
*/
if (pfsvplock & PROCFS_LOCKED) {
pfsvplock |= PROCFS_WANT;
sleep((caddr_t) &pfsvplock, PINOD);
(void) tsleep((caddr_t) &pfsvplock, PINOD, "pfsavp", 0);
goto loop;
}
pfsvplock |= PROCFS_LOCKED;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.4 1994/08/08 09:11:36 davidg Exp $
* $Id: spec_vnops.c,v 1.5 1994/09/21 03:47:09 wollman Exp $
*/
#include <sys/param.h>
@ -465,7 +465,7 @@ loop:
if (ap->a_waitfor == MNT_WAIT) {
while (vp->v_numoutput) {
vp->v_flag |= VBWAIT;
sleep((caddr_t)&vp->v_numoutput, PRIBIO + 1);
(void) tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1, "spfsyn", 0);
}
#ifdef DIAGNOSTIC
if (vp->v_dirtyblkhd.lh_first) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.4 (Berkeley) 2/17/94
* $Id$
* $Id: union_subr.c,v 1.3 1994/08/02 07:45:44 davidg Exp $
*/
#include <sys/param.h>
@ -80,7 +80,7 @@ union_list_lock(ix)
if (unvplock[ix] & UN_LOCKED) {
unvplock[ix] |= UN_WANT;
sleep((caddr_t) &unvplock[ix], PINOD);
(void) tsleep((caddr_t) &unvplock[ix], PINOD, "unllck", 0);
return (1);
}
@ -311,7 +311,7 @@ loop:
if (un->un_flags & UN_LOCKED) {
vrele(UNIONTOV(un));
un->un_flags |= UN_WANT;
sleep((caddr_t) &un->un_flags, PINOD);
(void) tsleep((caddr_t) &un->un_flags, PINOD, "unalvp", 0);
goto loop;
}
un->un_flags |= UN_LOCKED;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vnops.c 8.6 (Berkeley) 2/17/94
* $Id: union_vnops.c,v 1.4 1994/09/21 03:47:14 wollman Exp $
* $Id: union_vnops.c,v 1.5 1994/09/21 23:22:45 wollman Exp $
*/
#include <sys/param.h>
@ -128,7 +128,7 @@ union_lookup1(udvp, dvp, vpp, cnp)
if (mp->mnt_flag & MNT_MLOCK) {
mp->mnt_flag |= MNT_MWAIT;
sleep((caddr_t) mp, PVFS);
(void) tsleep((caddr_t) mp, PVFS, "unlkup", 0);
continue;
}
@ -1253,7 +1253,7 @@ union_lock(ap)
start:
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "unnlk1", 0);
}
un = VTOUNION(vp);
@ -1276,7 +1276,7 @@ start:
panic("union: locking against myself");
#endif
un->un_flags |= UN_WANT;
sleep((caddr_t) &un->un_flags, PINOD);
(void) tsleep((caddr_t) &un->un_flags, PINOD, "unnlk2", 0);
goto start;
}

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_denode.c,v 1.1 1994/09/19 15:41:41 dfr Exp $ */
/* $Id: msdosfs_denode.c,v 1.2 1994/09/27 20:42:44 phk Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
/*-
@ -96,7 +96,7 @@ msdosfs_hashget(dev, dirclust, diroff)
continue;
if (dep->de_flag & DE_LOCKED) {
dep->de_flag |= DE_WANTED;
sleep((caddr_t)dep, PINOD);
(void) tsleep((caddr_t)dep, PINOD, "msdhgt", 0);
break;
}
if (!vget(DETOV(dep), 1))

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.3 1994/09/27 20:42:56 phk Exp $ */
/* $Id: msdosfs_vnops.c,v 1.4 1994/09/28 16:45:14 dfr Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@ -1714,7 +1714,7 @@ msdosfs_lock(ap)
if (dep->de_lockholder == curproc->p_pid)
panic("msdosfs_lock: locking against myself");
dep->de_lockwaiter = curproc->p_pid;
(void) sleep((caddr_t) dep, PINOD);
(void) tsleep((caddr_t) dep, PINOD, "msdlck", 0);
}
dep->de_lockwaiter = 0;
dep->de_lockholder = curproc->p_pid;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.2 (Berkeley) 12/30/93
* $Id: nfs_node.c,v 1.4 1994/08/10 19:48:23 davidg Exp $
* $Id: nfs_node.c,v 1.5 1994/10/02 17:26:56 phk Exp $
*/
#include <sys/param.h>
@ -254,7 +254,7 @@ nfs_lock(ap)
*/
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "nfslck", 0);
}
if (vp->v_tag == VT_NON)
return (ENOENT);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.2 (Berkeley) 12/30/93
* $Id: nfs_node.c,v 1.4 1994/08/10 19:48:23 davidg Exp $
* $Id: nfs_node.c,v 1.5 1994/10/02 17:26:56 phk Exp $
*/
#include <sys/param.h>
@ -254,7 +254,7 @@ nfs_lock(ap)
*/
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "nfslck", 0);
}
if (vp->v_tag == VT_NON)
return (ENOENT);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vnops.c 8.7 (Berkeley) 2/3/94
* $Id: ffs_vnops.c,v 1.4 1994/09/21 03:47:38 wollman Exp $
* $Id: ffs_vnops.c,v 1.5 1994/09/22 19:38:32 wollman Exp $
*/
#include <sys/param.h>
@ -276,7 +276,7 @@ loop:
if (ap->a_waitfor == MNT_WAIT) {
while (vp->v_numoutput) {
vp->v_flag |= VBWAIT;
sleep((caddr_t)&vp->v_numoutput, PRIBIO + 1);
(void) tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1, "ffsfsn", 0);
}
#ifdef DIAGNOSTIC
if (vp->v_dirtyblkhd.lh_first) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.4 (Berkeley) 12/30/93
* $Id$
* $Id: ufs_ihash.c,v 1.2 1994/08/02 07:54:55 davidg Exp $
*/
#include <sys/param.h>
@ -100,7 +100,7 @@ ufs_ihashget(device, inum)
if (inum == ip->i_number && device == ip->i_dev) {
if (ip->i_flag & IN_LOCKED) {
ip->i_flag |= IN_WANTED;
sleep(ip, PINOD);
(void) tsleep(ip, PINOD, "uihget", 0);
break;
}
vp = ITOV(ip);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_quota.c 8.2 (Berkeley) 12/30/93
* $Id$
* $Id: ufs_quota.c,v 1.2 1994/08/02 07:54:59 davidg Exp $
*/
#include <sys/param.h>
#include <sys/kernel.h>
@ -120,7 +120,7 @@ chkdq(ip, change, cred, flags)
continue;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "chkdq1", 0);
}
ncurblocks = dq->dq_curblocks + change;
if (ncurblocks >= 0)
@ -145,7 +145,7 @@ chkdq(ip, change, cred, flags)
continue;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "chkdq2", 0);
}
dq->dq_curblocks += change;
dq->dq_flags |= DQ_MOD;
@ -235,7 +235,7 @@ chkiq(ip, change, cred, flags)
continue;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "chkiq1", 0);
}
ncurinodes = dq->dq_curinodes + change;
if (ncurinodes >= 0)
@ -260,7 +260,7 @@ chkiq(ip, change, cred, flags)
continue;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "chkiq2", 0);
}
dq->dq_curinodes += change;
dq->dq_flags |= DQ_MOD;
@ -527,7 +527,7 @@ setquota(mp, id, type, addr)
dq = ndq;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "setqta", 0);
}
/*
* Copy all but the current values.
@ -586,7 +586,7 @@ setuse(mp, id, type, addr)
dq = ndq;
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+1);
(void) tsleep((caddr_t)dq, PINOD+1, "setuse", 0);
}
/*
* Reset time limit if have a soft limit and were
@ -879,7 +879,7 @@ dqsync(vp, dq)
VOP_LOCK(dqvp);
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
sleep((caddr_t)dq, PINOD+2);
(void) tsleep((caddr_t)dq, PINOD+2, "dqsync", 0);
if ((dq->dq_flags & DQ_MOD) == 0) {
if (vp != dqvp)
VOP_UNLOCK(dqvp);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vnops.c 8.10 (Berkeley) 4/1/94
* $Id: ufs_vnops.c,v 1.6 1994/09/27 20:33:37 phk Exp $
* $Id: ufs_vnops.c,v 1.7 1994/09/28 16:45:22 dfr Exp $
*/
#include <sys/param.h>
@ -1508,7 +1508,7 @@ ufs_lock(ap)
start:
while (vp->v_flag & VXLOCK) {
vp->v_flag |= VXWANT;
sleep((caddr_t)vp, PINOD);
(void) tsleep((caddr_t)vp, PINOD, "ufslk1", 0);
}
if (vp->v_tag == VT_NON)
return (ENOENT);
@ -1523,7 +1523,7 @@ start:
} else
ip->i_lockwaiter = -1;
#endif
(void) sleep((caddr_t)ip, PINOD);
(void) tsleep((caddr_t)ip, PINOD, "ufslk2", 0);
goto start;
}
#ifdef DIAGNOSTIC