From a975053605a0f041fd2003792d81c80391527e71 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Mon, 21 Dec 2009 00:11:00 +0100 Subject: Made status bar into a namespace, and added functionnalities --- Source/Kernel/TaskManager/Process.class.cpp | 2 ++ Source/Kernel/TaskManager/Task.ns.h | 3 +++ 2 files changed, 5 insertions(+) (limited to 'Source/Kernel/TaskManager') 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 *processes; + extern SimpleList *threads; + void initialize(String cmdline, VirtualTerminal *vt); //cmdline should be the bootloader kernel command line, if anybody needs it void doSwitch(); void triggerSwitch(); -- cgit v1.2.3