tsleep => msleep

read sys/kern/kern_synch.c, msleep ():

	KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
	    ("sleeping without a mutex"));

MFC after:	3 days
This commit is contained in:
Roman Kurakin 2004-12-26 20:47:41 +00:00
parent 8e5c1e59fb
commit 47095f775f

View File

@ -433,8 +433,8 @@ ngdread(struct cdev *dev, struct uio *uio, int flag)
return (EWOULDBLOCK);
mtx_lock(&priv->ngd_mtx);
priv->flags |= NGDF_RWAIT;
mtx_unlock(&priv->ngd_mtx);
if ((error = tsleep(priv, PCATCH | (PZERO + 1),
if ((error = msleep(priv, &priv->ngd_mtx,
PDROP | PCATCH | (PZERO + 1),
"ngdread", 0)) != 0)
return (error);
}