diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-04 19:09:14 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-04 19:16:17 -0400 |
commit | 695c9b7475c88e337e15eed5ee6f8b607b515a77 (patch) | |
tree | 3bee7c1efd6f1db66beca57ae9e72960d84dc779 /sys/include | |
parent | b3f3697c9f2d63fe280a0954294ff9a2c56a6b71 (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <sys/proc.h> #include <sys/cdefs.h> #include <sys/limits.h> +#include <sys/time.h> /* * 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); |