From 2b60cfc5ce2922b22d08218e437eb44ddb17d0c0 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 9 Apr 2002 16:26:37 +0000 Subject: [PATCH] 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. --- sys/kern/kern_intr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 4020a191c2bb..dce8a47f0e08 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -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);