All three of these drivers abused cv_waitq_empty in the same way by spinning

on it in hopes of making sure that the waitq was empty before going on.
This wasn't needed and probably never would have worked as intended.  Now
that cv_waitq_empty() and friends are gone, the code in these drivers that
spins on it can go away too.  This should unbreak LINT.

Discussed with:	kan
This commit is contained in:
Scott Long 2004-02-29 09:26:01 +00:00
parent 77585df415
commit 474e30f0b1
3 changed files with 4 additions and 15 deletions

View File

@ -1415,10 +1415,7 @@ en_reset_ul(struct en_softc *sc)
/*
* Unstop all waiters
*/
while (!cv_waitq_empty(&sc->cv_close)) {
cv_broadcast(&sc->cv_close);
DELAY(100);
}
cv_broadcast(&sc->cv_close);
}
/*

View File

@ -2312,13 +2312,8 @@ hatm_stop(struct hatm_softc *sc)
* Give any waiters on closing a VCC a chance. They will stop
* to wait if they see that IFF_RUNNING disappeared.
*/
while (!(cv_waitq_empty(&sc->vcc_cv))) {
cv_broadcast(&sc->vcc_cv);
DELAY(100);
}
while (!(cv_waitq_empty(&sc->cv_rcclose))) {
cv_broadcast(&sc->cv_rcclose);
}
cv_broadcast(&sc->vcc_cv);
cv_broadcast(&sc->cv_rcclose);
/*
* Now free all resources.

View File

@ -269,10 +269,7 @@ patm_stop(struct patm_softc *sc)
* Give any waiters on closing a VCC a chance. They will stop
* to wait if they see that IFF_RUNNING disappeared.
*/
while (!(cv_waitq_empty(&sc->vcc_cv))) {
cv_broadcast(&sc->vcc_cv);
DELAY(100);
}
cv_broadcast(&sc->vcc_cv);
/* free large buffers */
patm_debug(sc, ATTACH, "freeing large buffers...");