diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
commit | 866580161b826443bed3862b8315cefd505de37c (patch) | |
tree | 23c3f87fe43d82c47af01c908d8a056785f9217f /Source/Kernel/TaskManager/Process.class.cpp | |
parent | 0cca2d68451849b5ea96a3620566fd0b42dde3c0 (diff) | |
download | Melon-866580161b826443bed3862b8315cefd505de37c.tar.gz Melon-866580161b826443bed3862b8315cefd505de37c.zip |
We now have call tables for ressources.
instead of adding calls to ressource in the constructor.
Diffstat (limited to 'Source/Kernel/TaskManager/Process.class.cpp')
-rw-r--r-- | Source/Kernel/TaskManager/Process.class.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/Kernel/TaskManager/Process.class.cpp b/Source/Kernel/TaskManager/Process.class.cpp index aae8fce..7ebac72 100644 --- a/Source/Kernel/TaskManager/Process.class.cpp +++ b/Source/Kernel/TaskManager/Process.class.cpp @@ -9,7 +9,14 @@ namespace Mem { extern Heap kheap; } -Process::Process() : Ressource(PR_IFACE_OBJTYPE) { //Private constructor, does nothing +call_t Process::m_callTable[] = { + CALL0(PRIF_EXIT, &Process::exitSC), + CALL1(PRIF_ALLOCPAGE, &Process::allocPageSC), + CALL1(PRIF_FREEPAGE, &Process::freePageSC), + CALL0(0, 0) +}; + +Process::Process() : Ressource(PRIF_OBJTYPE, m_callTable) { //Private constructor, does nothing } Process* Process::createKernel(String cmdline, VirtualTerminal *vt) { @@ -54,10 +61,7 @@ Process* Process::run(String filename, FSNode* cwd, u32int uid) { } } -Process::Process(String cmdline, u32int uid) : Ressource(PR_IFACE_OBJTYPE) { - addCall0(PR_IFACE_EXIT, (call0)&Process::exitSC); - addCall1(PR_IFACE_ALLOCPAGE, (call1)&Process::allocPageSC); - addCall1(PR_IFACE_FREEPAGE, (call1)&Process::freePageSC); +Process::Process(String cmdline, u32int uid) : Ressource(PRIF_OBJTYPE, m_callTable) { m_pid = Task::nextPid(); m_cmdline = cmdline; m_retval = 0; |