From d1ac6fb03e3110e35023f60f643f0c4d02c3d8b6 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sat, 24 Oct 2009 22:58:28 +0200 Subject: More work on syscalls : userland applications can run other apps. --- Source/Kernel/SyscallManager/Ressource.class.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Kernel/SyscallManager') diff --git a/Source/Kernel/SyscallManager/Ressource.class.cpp b/Source/Kernel/SyscallManager/Ressource.class.cpp index 8862bca..ec9137b 100644 --- a/Source/Kernel/SyscallManager/Ressource.class.cpp +++ b/Source/Kernel/SyscallManager/Ressource.class.cpp @@ -1,6 +1,7 @@ #include "Ressource.class.h" #include #include +#include Ressource::Ressource(u8int type, call_t* callTable) : m_lock(MUTEX_FALSE) { m_id = Res::registerRes(this); @@ -20,8 +21,6 @@ void Ressource::addCallTable(call_t* callTable) { } u32int Ressource::doCall(u8int id, u32int a, u32int b, u32int c, u32int d, u32int e) { - if (id == 0) return m_type; - for (SimpleList *iter = m_callTables; iter != 0; iter = iter->next()) { call_t* ct = iter->v(); u32int i = 0; @@ -43,6 +42,7 @@ u32int Ressource::doCall(u8int id, u32int a, u32int b, u32int c, u32int d, u32in u32int Ressource::call(u8int id, u32int a, u32int b, u32int c, u32int d, u32int e) { if (!ISROOT && !accessible()) return (u32int) - 1; + if (id == 0) return m_type; m_lock.waitLock(); u32int r = doCall(id, a, b, c, d, e); m_lock.unlock(); -- cgit v1.2.3