summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-12-09 02:42:02 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-12-09 02:42:02 +0000
commit171976dba2208151b69025bbf1a0b5f395ddf742 (patch)
tree55786772bf8f6d419f8a02f1838bde8b593e497f /sys/kern/kern_thread.c
parent9eb44e2a50d42aea2650694312bacb8b83a22cc5 (diff)
downloadFreeBSD-src-171976dba2208151b69025bbf1a0b5f395ddf742.zip
FreeBSD-src-171976dba2208151b69025bbf1a0b5f395ddf742.tar.gz
MFp4:
It is possible a lower priority thread lending priority to higher priority thread, in old code, it is ignored, however the lending should always be recorded, add field td_lend_user_pri to fix the problem, if a thread does not have borrowed priority, its value is PRI_MAX. MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 5f07590..3e651bb 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -110,6 +110,7 @@ thread_ctor(void *mem, int size, void *arg, int flags)
* end of a context switch.
*/
td->td_critnest = 1;
+ td->td_lend_user_pri = PRI_MAX;
EVENTHANDLER_INVOKE(thread_ctor, td);
#ifdef AUDIT
audit_thread_alloc(td);
OpenPOWER on IntegriCloud