According to SLEEP(9), msleep() is deprecated in favour of mtx_sleep().
Sponsored by: FreeBSD Foundation Reviewed by: dwmalone, jeff, rpaulo, rwatson (as part of a larger patch) Approved by: kmacy (mentor) MFC after: 1 month
This commit is contained in:
parent
c0ea37a885
commit
9ffad7a94d
@ -191,7 +191,7 @@ ald_daemon(void)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
while ((alq = LIST_FIRST(&ald_active)) == NULL &&
|
while ((alq = LIST_FIRST(&ald_active)) == NULL &&
|
||||||
!ald_shutingdown)
|
!ald_shutingdown)
|
||||||
msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0);
|
mtx_sleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0);
|
||||||
|
|
||||||
/* Don't shutdown until all active ALQs are flushed. */
|
/* Don't shutdown until all active ALQs are flushed. */
|
||||||
if (ald_shutingdown && alq == NULL) {
|
if (ald_shutingdown && alq == NULL) {
|
||||||
@ -234,12 +234,12 @@ ald_shutdown(void *arg, int howto)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Wake ald_daemon so that it exits. It won't be able to do
|
* Wake ald_daemon so that it exits. It won't be able to do
|
||||||
* anything until we msleep because we hold the ald_mtx.
|
* anything until we mtx_sleep because we hold the ald_mtx.
|
||||||
*/
|
*/
|
||||||
wakeup(&ald_active);
|
wakeup(&ald_active);
|
||||||
|
|
||||||
/* Wait for ald_daemon to exit. */
|
/* Wait for ald_daemon to exit. */
|
||||||
msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0);
|
mtx_sleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0);
|
||||||
|
|
||||||
ALD_UNLOCK();
|
ALD_UNLOCK();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user