Module Name:    src
Committed By:   ad
Date:           Fri Nov 22 23:38:15 UTC 2019

Modified Files:
        src/sys/sys: userret.h

Log Message:
Add a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/userret.h
diff -u src/sys/sys/userret.h:1.29 src/sys/sys/userret.h:1.30
--- src/sys/sys/userret.h:1.29	Thu Nov 21 19:24:02 2019
+++ src/sys/sys/userret.h	Fri Nov 22 23:38:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.29 2019/11/21 19:24:02 ad Exp $	*/
+/*	$NetBSD: userret.h,v 1.30 2019/11/22 23:38:15 ad Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2003, 2006, 2008, 2019 The NetBSD Foundation, Inc.
@@ -101,6 +101,12 @@ mi_userret(struct lwp *l)
 		ci = l->l_cpu;
 	}
 	l->l_kpriority = false;
+	/*
+	 * lwp_eprio() is too involved to use here unlocked.  At this point
+	 * it only matters for PTHREAD_PRIO_PROTECT; setting a too low value
+	 * is OK because the scheduler will find out the true value if we
+	 * end up in mi_switch().
+	 */
 	ci->ci_schedstate.spc_curpriority = l->l_priority;
 	KPREEMPT_ENABLE(l);
 

Reply via email to