summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-02-26 23:27:35 +0000
committerjake <jake@FreeBSD.org>2001-02-26 23:27:35 +0000
commit3d95b58cac052a546c50e19bcf2ffaee25d0b127 (patch)
tree008ddc14d7d265be71f0919ec666ec624e507369 /sys/kern/init_main.c
parent88383c1fc469dc0031b59f9f8ce8c41a8bb37d96 (diff)
downloadFreeBSD-src-3d95b58cac052a546c50e19bcf2ffaee25d0b127.zip
FreeBSD-src-3d95b58cac052a546c50e19bcf2ffaee25d0b127.tar.gz
Initialize native priority to PRI_MAX. It was usually 0 which made a
process's priority go through the roof when it released a (contested) mutex. Only set the native priority in mtx_lock if hasn't already been set. Reviewed by: jhb
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 8c59342..4231390 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -306,6 +306,7 @@ proc0_init(void *dummy __unused)
p->p_nice = NZERO;
p->p_pri.pri_class = PRI_TIMESHARE;
p->p_pri.pri_level = PVM;
+ p->p_pri.pri_native = PRI_MAX;
p->p_pri.pri_user = PUSER;
p->p_peers = 0;
OpenPOWER on IntegriCloud