diff options
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(); |