summaryrefslogtreecommitdiff
path: root/Source/Kernel/SyscallManager
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-24 22:58:28 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-24 22:58:28 +0200
commitd1ac6fb03e3110e35023f60f643f0c4d02c3d8b6 (patch)
treeb7f693ab8ea9d320f5bd1b838e8eb3d3bcd690f4 /Source/Kernel/SyscallManager
parentb639b99b3e8f4cf77560d8d473b13d992ac8eb10 (diff)
downloadMelon-d1ac6fb03e3110e35023f60f643f0c4d02c3d8b6.tar.gz
Melon-d1ac6fb03e3110e35023f60f643f0c4d02c3d8b6.zip
More work on syscalls : userland applications can run other apps.
Diffstat (limited to 'Source/Kernel/SyscallManager')
-rw-r--r--Source/Kernel/SyscallManager/Ressource.class.cpp4
1 files changed, 2 insertions, 2 deletions
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 <SyscallManager/Res.ns.h>
#include <UserManager/Usr.ns.h>
+#include <TaskManager/Task.ns.h>
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<call_t*> *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();