diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-21 00:11:00 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-21 00:11:00 +0100 |
commit | a975053605a0f041fd2003792d81c80391527e71 (patch) | |
tree | 6c0c0fac346d111449411a3222911c1a363cbefc /Source/Kernel/TaskManager | |
parent | 2a9defea402eec36e075e9e835b804dcc6926748 (diff) | |
download | Melon-a975053605a0f041fd2003792d81c80391527e71.tar.gz Melon-a975053605a0f041fd2003792d81c80391527e71.zip |
Made status bar into a namespace, and added functionnalities
Diffstat (limited to 'Source/Kernel/TaskManager')
-rw-r--r-- | Source/Kernel/TaskManager/Process.class.cpp | 2 | ||||
-rw-r--r-- | Source/Kernel/TaskManager/Task.ns.h | 3 |
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(); |