summaryrefslogtreecommitdiff
path: root/Source/Kernel/SyscallManager
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-23 19:40:08 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-23 19:40:08 +0200
commit48de0cd029b52f64f76345b6e1fdf3cde5c58de3 (patch)
tree792061381c556bef6639b327716cca107f6168c5 /Source/Kernel/SyscallManager
parentf0556ed7f051fb101dc68752526696365bf79a11 (diff)
downloadMelon-48de0cd029b52f64f76345b6e1fdf3cde5c58de3.tar.gz
Melon-48de0cd029b52f64f76345b6e1fdf3cde5c58de3.zip
More work on syscalls and shell
Diffstat (limited to 'Source/Kernel/SyscallManager')
-rw-r--r--Source/Kernel/SyscallManager/Res.ns.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Kernel/SyscallManager/Res.ns.h b/Source/Kernel/SyscallManager/Res.ns.h
index e454693..d3a0129 100644
--- a/Source/Kernel/SyscallManager/Res.ns.h
+++ b/Source/Kernel/SyscallManager/Res.ns.h
@@ -5,9 +5,19 @@
namespace Res {
+extern Ressource** ressources;
+extern u32int size;
+
u32int registerRes(Ressource* r);
void unregisterRes(u32int id);
+template <typename T>
+T* get(u32int id, u32int type) {
+ if (id > size or ressources[id] == 0) return 0;
+ if (ressources[id]->resType() != type) return 0;
+ return (T*)ressources[id];
+}
+
u32int call(u32int ressource, u8int wat, u32int a, u32int b, u32int c, u32int d, u32int e);
}