kthread_exit() no longer requires Giant, so don't force callers to acquire
Giant just to call kthread_exit(). Requested by: many
This commit is contained in:
parent
12dd6da62c
commit
6074439965
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126674
@ -244,7 +244,6 @@ ndis_runq(arg)
|
||||
}
|
||||
|
||||
wakeup(die);
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
@ -814,7 +814,6 @@ aac_command_thread(struct aac_softc *sc)
|
||||
AAC_LOCK_RELEASE(&sc->aac_io_lock);
|
||||
wakeup(sc->aac_dev);
|
||||
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
@ -638,8 +638,8 @@ md_kthread(void *arg)
|
||||
mtx_unlock(&sc->queue_mtx);
|
||||
sc->procp = NULL;
|
||||
wakeup(&sc->procp);
|
||||
if (!hasgiant)
|
||||
mtx_lock(&Giant);
|
||||
if (hasgiant)
|
||||
mtx_unlock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
msleep(sc, &sc->queue_mtx, PRIBIO | PDROP, "mdwait", 0);
|
||||
|
@ -1053,7 +1053,6 @@ cbb_event_thread(void *arg)
|
||||
mtx_unlock(&sc->mtx);
|
||||
}
|
||||
sc->flags &= ~CBB_KTHREAD_RUNNING;
|
||||
mtx_lock(&Giant); /* kthread_exit drops */
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,6 @@ void
|
||||
random_set_wakeup_exit(void *control)
|
||||
{
|
||||
wakeup(control);
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
@ -1512,7 +1512,6 @@ utopia_daemon(void *arg __unused)
|
||||
}
|
||||
wakeup_one(&utopia_list);
|
||||
UTP_RUNLOCK_LIST();
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,6 @@ g_bde_worker(void *arg)
|
||||
mtx_unlock(&sc->worklist_mutex);
|
||||
sc->dead = 2;
|
||||
wakeup(sc);
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,6 @@ ithread_loop(void *arg)
|
||||
p->p_pid, p->p_comm);
|
||||
td->td_ithd = NULL;
|
||||
mtx_destroy(&ithd->it_lock);
|
||||
mtx_lock(&Giant);
|
||||
free(ithd, M_ITHREAD);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
@ -509,6 +509,7 @@ nfs4_daemon(void *arg)
|
||||
if (nmounts == 0) {
|
||||
mtx_lock(&Giant);
|
||||
nfs4_daemonproc = NULL;
|
||||
mtx_unlock(&Giant);
|
||||
printf("nfsv4 renewd exiting\n");
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
@ -1055,7 +1055,6 @@ crypto_finis(void *chan)
|
||||
CRYPTO_DRIVER_LOCK();
|
||||
wakeup_one(chan);
|
||||
CRYPTO_DRIVER_UNLOCK();
|
||||
mtx_lock(&Giant);
|
||||
kthread_exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user