aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/proc.h2
-rw-r--r--sys/include/sys/sched.h4
-rw-r--r--sys/include/sys/sched_state.h6
3 files changed, 8 insertions, 4 deletions
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h
index 5106bf3..f45e4c6 100644
--- a/sys/include/sys/proc.h
+++ b/sys/include/sys/proc.h
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <machine/cpu.h>
+#include <machine/frame.h>
/*
* A task running on the CPU e.g., a process or
@@ -41,6 +42,7 @@
struct proc {
pid_t pid;
struct cpu_info *cpu;
+ struct trapframe *tf;
TAILQ_ENTRY(proc) link;
};
diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h
index 4fdf065..d803df0 100644
--- a/sys/include/sys/sched.h
+++ b/sys/include/sys/sched.h
@@ -35,6 +35,10 @@
#include <sys/types.h>
#include <sys/spinlock.h>
#include <machine/cpu.h>
+#include <machine/frame.h>
+
+void sched_init(void);
+void sched_context_switch(struct trapframe *tf);
__noreturn
void sched_init_processor(struct cpu_info *ci);
diff --git a/sys/include/sys/sched_state.h b/sys/include/sys/sched_state.h
index 03a55dd..52d6c56 100644
--- a/sys/include/sys/sched_state.h
+++ b/sys/include/sys/sched_state.h
@@ -30,15 +30,13 @@
#ifndef _SYS_SCHED_STATE_H_
#define _SYS_SCHED_STATE_H_
-#include <sys/types.h>
-#include <sys/queue.h>
+#include <sys/proc.h>
/*
* Scheduler state, per CPU.
*/
struct sched_state {
- TAILQ_HEAD(, proc) queue;
- size_t queue_nrun; /* Number of processes in the run queue */
+ struct proc *td; /* Current_thread */
};
#endif /* !_SYS_SCHED_STATE_H_ */