From 695c9b7475c88e337e15eed5ee6f8b607b515a77 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 4 Aug 2025 19:09:14 -0400 Subject: kernel: sched: Add sched_suspend() Introduce a new sched_suspend() function that allows the caller to suspend themselves (equivalent to a yield) for a specified amount of time described by a 'timeval'. Signed-off-by: Ian Moffett --- sys/include/sys/sched.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h index 7a859b2..19ceb7e 100644 --- a/sys/include/sys/sched.h +++ b/sys/include/sys/sched.h @@ -33,6 +33,7 @@ #include #include #include +#include /* * Scheduler CPU information @@ -66,6 +67,7 @@ void sched_stat(struct sched_stat *statp); void sched_init(void); void sched_yield(void); +void sched_suspend(struct proc *td, const struct timeval *tv); void sched_detach(struct proc *td); __dead void sched_enter(void); -- cgit v1.2.3