1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Backout rev 1.17, msleep() can't be used with a spinlock.

Pointy hat to:	cognet
This commit is contained in:
Olivier Houchard 2007-03-06 12:08:38 +00:00
parent ec383c971f
commit aed12d5ff8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167266

View File

@ -224,7 +224,9 @@ alq_shutdown(struct alq *alq)
/* Drain IO */
while (alq->aq_flags & (AQ_FLUSHING|AQ_ACTIVE)) {
alq->aq_flags |= AQ_WANTED;
msleep(alq, &(alq)->aq_mtx, PWAIT, "aldclose", 0);
ALQ_UNLOCK(alq);
tsleep(alq, PWAIT, "aldclose", 0);
ALQ_LOCK(alq);
}
ALQ_UNLOCK(alq);
@ -431,7 +433,9 @@ alq_get(struct alq *alq, int waitok)
(ale = alq->aq_entfree) == NULL &&
(waitok & ALQ_WAITOK)) {
alq->aq_flags |= AQ_WANTED;
msleep(alq, &(alq)->aq_mtx, PWAIT, "alqget", 0);
ALQ_UNLOCK(alq);
tsleep(alq, PWAIT, "alqget", 0);
ALQ_LOCK(alq);
}
if (ale != NULL) {