Just grab the SCHED_LOCK() once in donice() before walking the ps_threads
authorclaudio <claudio@openbsd.org>
Wed, 22 May 2024 09:20:22 +0000 (09:20 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 22 May 2024 09:20:22 +0000 (09:20 +0000)
commitf5a6fea6afbf41ba68c0a53f5a4f2277e47251f3
treecc8bfba070765554fad41216d98f7099164d77d5
parentf7af79d42719ad5fb6d136005c195d90f18edba3
Just grab the SCHED_LOCK() once in donice() before walking the ps_threads
list. setpriority() is trivial and probably faster than releasing and
relocking SCHED_LOCK().
OK jca@
sys/kern/kern_resource.c