summaryrefslogtreecommitdiff
path: root/Source/Kernel/SyscallManager/Ressource.class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/SyscallManager/Ressource.class.cpp')
-rw-r--r--Source/Kernel/SyscallManager/Ressource.class.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Kernel/SyscallManager/Ressource.class.cpp b/Source/Kernel/SyscallManager/Ressource.class.cpp
index f2aaccb..8862bca 100644
--- a/Source/Kernel/SyscallManager/Ressource.class.cpp
+++ b/Source/Kernel/SyscallManager/Ressource.class.cpp
@@ -1,7 +1,8 @@
#include "Ressource.class.h"
#include <SyscallManager/Res.ns.h>
+#include <UserManager/Usr.ns.h>
-Ressource::Ressource(u8int type, call_t* callTable) {
+Ressource::Ressource(u8int type, call_t* callTable) : m_lock(MUTEX_FALSE) {
m_id = Res::registerRes(this);
m_type = type;
m_callTables = 0;
@@ -39,3 +40,11 @@ u32int Ressource::doCall(u8int id, u32int a, u32int b, u32int c, u32int d, u32in
}
return (u32int) - 1;
}
+
+u32int Ressource::call(u8int id, u32int a, u32int b, u32int c, u32int d, u32int e) {
+ if (!ISROOT && !accessible()) return (u32int) - 1;
+ m_lock.waitLock();
+ u32int r = doCall(id, a, b, c, d, e);
+ m_lock.unlock();
+ return r;
+}