summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 5ad7882..6810537 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -194,6 +194,8 @@ proc_init(void *mem, int size)
ke = kse_alloc();
kg = ksegrp_alloc();
proc_linkup(p, kg, ke, td);
+ bzero(&p->p_mtx, sizeof(struct mtx));
+ mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
}
/*
@@ -220,6 +222,7 @@ proc_fini(void *mem, int size)
thread_free(td);
ksegrp_free(kg);
kse_free(ke);
+ mtx_destroy(&p->p_mtx);
}
/*
OpenPOWER on IntegriCloud