aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-07-14 20:13:10 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-07-14 20:13:10 +0000
commitfea89a2804ad89f5342268a8546a3f9b515b5e6c (patch)
tree7b482a3fb07b1f021874687523bb23ec5732b037 /sys/kern/sched_ule.c
parenta985fad6e054cd66331956a8dbb20506c55189e5 (diff)
downloadsrc-fea89a2804ad89f5342268a8546a3f9b515b5e6c.tar.gz
src-fea89a2804ad89f5342268a8546a3f9b515b5e6c.zip
Add sched_ithread_prio to set the base priority of an interrupt thread.
Use it instead of sched_prio when setting the priority of an interrupt thread. Reviewed by: kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35642
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 14d6e689081d..c4eb46944b43 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -1963,6 +1963,18 @@ sched_prio(struct thread *td, u_char prio)
}
/*
+ * Set the base interrupt thread priority.
+ */
+void
+sched_ithread_prio(struct thread *td, u_char prio)
+{
+ THREAD_LOCK_ASSERT(td, MA_OWNED);
+ MPASS(td->td_pri_class == PRI_ITHD);
+ td->td_base_ithread_pri = prio;
+ sched_prio(td, prio);
+}
+
+/*
* Set the base user priority, does not effect current running priority.
*/
void