summaryrefslogtreecommitdiff
path: root/src/kernel/task/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/task/task.c')
-rw-r--r--src/kernel/task/task.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kernel/task/task.c b/src/kernel/task/task.c
index 6959676..dec7565 100644
--- a/src/kernel/task/task.c
+++ b/src/kernel/task/task.c
@@ -4,6 +4,7 @@
#include <mem/mem.h>
#include <mem/seg.h>
#include <mem/gdt.h>
+#include <ipc/object.h>
#include "timer.h"
#define KSTACKSIZE 0x8000
@@ -39,7 +40,7 @@ void tasking_init() {
idle_thread = thread_new(kernel_process, task_idle, 0);
threads = 0; //Do not include idle thread in threads
sti();
- monitor_write("Tasking set up\n");
+ monitor_write("[Tasking] ");
}
static struct thread *thread_next() {
@@ -130,6 +131,10 @@ void thread_goInactive() {
tasking_switch();
}
+void thread_wakeUp(struct thread* t) {
+ if (t->state == TS_WAKEWAIT) t->state = TS_RUNNING;
+}
+
int proc_priv() {
if (current_thread == 0) return PL_UNKNOWN;
return current_thread->process->privilege;