From 2db57d095d2be9973c89fb97b72047d353fb4ad3 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 20 Aug 2025 00:47:13 -0400 Subject: kernel: Allow preemption to be enabled/disabled Introduce sched_preempt_set() which can be useful to implement priority inheritance for preventing priority inversion Signed-off-by: Ian Moffett --- sys/include/sys/sched.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/include') diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h index 8b0ba02..8deef95 100644 --- a/sys/include/sys/sched.h +++ b/sys/include/sys/sched.h @@ -66,6 +66,7 @@ struct sched_stat { void sched_stat(struct sched_stat *statp); void sched_init(void); +void sched_preempt_set(bool enable); void sched_yield(void); void sched_suspend(struct proc *td, const struct timeval *tv); void sched_detach(struct proc *td); -- cgit v1.2.3