Don't lock the ithread lock in ithread_create(). The ithread isn't on any

lists or in any tables yet so there are no other references to it, thus
we don't need to lock it.
This commit is contained in:
John Baldwin 2002-04-09 16:26:37 +00:00
parent 1bdb20a68e
commit 2b60cfc5ce

View File

@ -184,7 +184,6 @@ ithread_create(struct ithd **ithread, int vector, int flags,
ithd->it_flags = flags;
TAILQ_INIT(&ithd->it_handlers);
mtx_init(&ithd->it_lock, "ithread", NULL, MTX_DEF);
mtx_lock(&ithd->it_lock);
va_start(ap, fmt);
vsnprintf(ithd->it_name, sizeof(ithd->it_name), fmt, ap);
@ -205,7 +204,6 @@ ithread_create(struct ithd **ithread, int vector, int flags,
td->td_ithd = ithd;
if (ithread != NULL)
*ithread = ithd;
mtx_unlock(&ithd->it_lock);
CTR2(KTR_INTR, "%s: created %s", __func__, ithd->it_name);
return (0);