summaryrefslogtreecommitdiff
path: root/Source/Kernel/TaskManager
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-22 15:03:48 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-22 15:03:48 +0100
commit2c23da1cf398aef420130dde1b86e4c474e3cacb (patch)
tree33f31cf7459fe017c35a313c88e4bfcb6f00eb8a /Source/Kernel/TaskManager
parent98decfffefc49c82f20a0453cef823f7588e7654 (diff)
parent837290db7d39c8cd852541cb345dc5a57c9274ce (diff)
downloadMelon-2c23da1cf398aef420130dde1b86e4c474e3cacb.tar.gz
Melon-2c23da1cf398aef420130dde1b86e4c474e3cacb.zip
Merge branch 'master' into framework
Conflicts: Melon.img
Diffstat (limited to 'Source/Kernel/TaskManager')
-rw-r--r--Source/Kernel/TaskManager/Process.class.cpp2
-rw-r--r--Source/Kernel/TaskManager/Task.ns.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/Source/Kernel/TaskManager/Process.class.cpp b/Source/Kernel/TaskManager/Process.class.cpp
index bca5f1c..4c23df0 100644
--- a/Source/Kernel/TaskManager/Process.class.cpp
+++ b/Source/Kernel/TaskManager/Process.class.cpp
@@ -76,12 +76,14 @@ Process::Process(String binfile, u32int uid) : Ressource(PRIF_OBJTYPE, m_callTab
m_userHeap = new Heap();
u32int heapIdxSize = PhysMem::total() * 16 + 0x10000;
m_userHeap->create(USERHEAPSTART, USERHEAPINITSIZE + heapIdxSize, heapIdxSize, m_pagedir, true, true);
+ Task::registerProcess(this);
}
Process::~Process() {
exit(); //Kill all threads
delete m_pagedir;
delete m_userHeap;
+ Task::unregisterProcess(this);
}
void Process::start() {
diff --git a/Source/Kernel/TaskManager/Task.ns.h b/Source/Kernel/TaskManager/Task.ns.h
index 056e4c0..4d2a48d 100644
--- a/Source/Kernel/TaskManager/Task.ns.h
+++ b/Source/Kernel/TaskManager/Task.ns.h
@@ -9,6 +9,9 @@ namespace Task {
Thread* currThread();
Process* currProcess();
+ extern SimpleList <Process*> *processes;
+ extern SimpleList <Thread*> *threads;
+
void initialize(String cmdline, VirtualTerminal *vt); //cmdline should be the bootloader kernel command line, if anybody needs it
void doSwitch();
void triggerSwitch();