summaryrefslogtreecommitdiff
path: root/src/kernel/task/task.c
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-03-24 15:40:16 +0100
committerAlexis211 <alexis211@gmail.com>2010-03-24 15:40:16 +0100
commitdbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd (patch)
tree793b49a6b89c1113c74ae3ee97d197f6070cb7a7 /src/kernel/task/task.c
parentcbadacbb881200b601c7b53b29aa0c1b78747692 (diff)
downloadTCE-dbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd.tar.gz
TCE-dbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd.zip
IPC not tested but suposedly working.
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;