summaryrefslogtreecommitdiff
path: root/include/kernel/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kernel/sched.h')
-rw-r--r--include/kernel/sched.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/kernel/sched.h b/include/kernel/sched.h
index fef36b8..00a5d95 100644
--- a/include/kernel/sched.h
+++ b/include/kernel/sched.h
@@ -2,26 +2,19 @@
#define KERNEL_SCHED_H
#include <kernel/asm.h>
-#include <kernel/data/list.h>
-
-#define THREAD_READY 0
-#define THREAD_RUNNING 1
-#define THREAD_WAIT 2
-
-struct task_block {
- unsigned int pid;
- unsigned int parent_pid;
- int nice;
- unsigned int num_threads;
- struct thread_block *threads;
- struct list_head list;
-};
+#include <kernel/kthread.h>
+#include <stdint.h>
void sched_init(void);
void schedule_next(void);
+void schedule_thread(struct kthread *thread);
+
+void block_thread(struct kthread *thread);
+void unblock_thread(struct kthread *thread);
+
+void sched_lock(void);
+void sched_unlock(void);
-struct task_block* init_task(int nice, unsigned int ppid);
-void schedule_thread(struct thread_block *thread);
-void switch_thread(struct thread_block *old, struct thread_block *new);
+void switch_thread(struct kthread *old, struct kthread *new);
#endif