summaryrefslogtreecommitdiff
path: root/Source/Kernel/TaskManager/Task.ns.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/TaskManager/Task.ns.h')
-rw-r--r--Source/Kernel/TaskManager/Task.ns.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/Kernel/TaskManager/Task.ns.h b/Source/Kernel/TaskManager/Task.ns.h
new file mode 100644
index 0000000..cc658f0
--- /dev/null
+++ b/Source/Kernel/TaskManager/Task.ns.h
@@ -0,0 +1,26 @@
+#ifndef DEF_TASK_NS_H
+#define DEF_TASK_NS_H
+
+#include <TaskManager/Thread.class.h>
+
+namespace Task {
+ extern Thread* currentThread;
+ extern Process* currentProcess;
+
+ void initialize(String cmdline); //cmdline should be the bootloader kernel command line, if anybody needs it
+ void doSwitch();
+ void triggerSwitch();
+ u32int nextPid();
+ bool IRQwakeup(u8int irq);
+
+ void allocKernelPageTable(u32int id, page_table_t *table, u32int tablePhys);
+ Process* getKernelProcess(); //Returns first registered process
+
+ //These are used by the constructors/destructors of Thread and Process
+ void registerThread(Thread* t);
+ void unregisterThread(Thread* t);
+ void registerProcess(Process* p);
+ void unregisterProcess(Process* p);
+}
+
+#endif