summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2006-01-04 08:22:39 +0000
committerphk <phk@FreeBSD.org>2006-01-04 08:22:39 +0000
commit04004b89a1d62abd632055b2e691dcdcef7e3478 (patch)
tree42d49e98027fc7a898026c930d630a08cd7f73a5 /sys
parent7f56ef50de36a74ade1572f376be6e697883f3dd (diff)
downloadFreeBSD-src-04004b89a1d62abd632055b2e691dcdcef7e3478.zip
FreeBSD-src-04004b89a1d62abd632055b2e691dcdcef7e3478.tar.gz
Use MTX_SYSINIT to set up the tty list mutex.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 94a3d40..1babc3d 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -253,6 +253,7 @@ static u_char const char_type[] = {
*/
static TAILQ_HEAD(, tty) tty_list = TAILQ_HEAD_INITIALIZER(tty_list);
static struct mtx tty_list_mutex;
+MTX_SYSINIT(tty_list, &tty_list_mutex, "ttylist", MTX_DEF);
static struct unrhdr *tty_unit;
@@ -2828,12 +2829,6 @@ ttyrel(struct tty *tp)
struct tty *
ttymalloc(struct tty *tp)
{
- static int once;
-
- if (!once) {
- mtx_init(&tty_list_mutex, "ttylist", NULL, MTX_DEF);
- once++;
- }
if (tp) {
/*
OpenPOWER on IntegriCloud