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:
John Baldwin 2004-03-05 22:42:17 +00:00
parent 12dd6da62c
commit 6074439965
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126674
10 changed files with 3 additions and 10 deletions

View File

@ -244,7 +244,6 @@ ndis_runq(arg)
}
wakeup(die);
mtx_lock(&Giant);
kthread_exit(0);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -128,7 +128,6 @@ void
random_set_wakeup_exit(void *control)
{
wakeup(control);
mtx_lock(&Giant);
kthread_exit(0);
/* NOTREACHED */
}

View File

@ -1512,7 +1512,6 @@ utopia_daemon(void *arg __unused)
}
wakeup_one(&utopia_list);
UTP_RUNLOCK_LIST();
mtx_lock(&Giant);
kthread_exit(0);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -1055,7 +1055,6 @@ crypto_finis(void *chan)
CRYPTO_DRIVER_LOCK();
wakeup_one(chan);
CRYPTO_DRIVER_UNLOCK();
mtx_lock(&Giant);
kthread_exit(0);
}