summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-16 20:44:54 -0400
committerIan Moffett <ian@osmora.org>2025-07-16 20:44:54 -0400
commitf6900b5c3b4832f48359fd761b80f8693a6735e8 (patch)
tree4a9b10e1935f5c2dc004ebe34038c2ef6738b841 /sys/include
parenta2a7a6c1137e38e1443b69c09296644b00ba4bd2 (diff)
kernel: Sort out switch MI/MD switch logic
Certain operations dealing with context switches are better off being implemented as machine dependent routines which allows us to be flexible with what we can do, as well as the extra benefit of requiring less workarounds to keep things MI. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/sched.h3
-rw-r--r--sys/include/sys/schedvar.h6
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h
index f4d99f9..d80483a 100644
--- a/sys/include/sys/sched.h
+++ b/sys/include/sys/sched.h
@@ -50,9 +50,8 @@ struct sched_stat {
void sched_stat(struct sched_stat *statp);
void sched_init(void);
-void sched_yield(void);
-void sched_switch_to(struct trapframe *tf, struct proc *td);
+void sched_yield(void);
void sched_detach(struct proc *td);
__dead void sched_enter(void);
diff --git a/sys/include/sys/schedvar.h b/sys/include/sys/schedvar.h
index 5ed9f5f..017fcb7 100644
--- a/sys/include/sys/schedvar.h
+++ b/sys/include/sys/schedvar.h
@@ -60,5 +60,11 @@ struct sched_queue {
size_t nthread;
};
+struct proc *sched_dequeue_td(void);
+void mi_sched_switch(struct proc *from);
+
+void md_sched_switch(struct trapframe *tf);
+void sched_oneshot(bool now);
+
#endif /* _KERNEL */
#endif /* !_SYS_SCHEDVAR_H_ */