diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-18 17:50:02 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-18 17:50:02 +0200 |
commit | eb7b832d47bcbd74181028c62e871d407ba63a23 (patch) | |
tree | 29489cb58898c77860fe83118ef30689e131ae2d /Source/Kernel/SyscallManager | |
parent | e589a45295a871f38d4a1d1f23b370b612f99be5 (diff) | |
download | Melon-eb7b832d47bcbd74181028c62e871d407ba63a23.tar.gz Melon-eb7b832d47bcbd74181028c62e871d407ba63a23.zip |
More work on syscalls
Diffstat (limited to 'Source/Kernel/SyscallManager')
-rw-r--r-- | Source/Kernel/SyscallManager/Res.ns.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Kernel/SyscallManager/Res.ns.cpp b/Source/Kernel/SyscallManager/Res.ns.cpp index aceadf7..274f6f1 100644 --- a/Source/Kernel/SyscallManager/Res.ns.cpp +++ b/Source/Kernel/SyscallManager/Res.ns.cpp @@ -1,6 +1,8 @@ #include "Res.ns.h" #include <VirtualTerminal.iface.h> +#include <Process.iface.h> +#include <Thread.iface.h> #include <TaskManager/Task.ns.h> namespace Res { @@ -42,6 +44,8 @@ void unregisterRes(u32int id) { u32int call(u32int ressource, u8int wat, u32int a, u32int b, u32int c, u32int d, u32int e) { if (ressource == 0xFFFFFE) { //TODO : return ressource id for some stuff for current process if (a == VT_IFACE_OBJTYPE) return Task::currProcess()->getVirtualTerminal()->resId(); + if (a == PR_IFACE_OBJTYPE) return Task::currProcess()->resId(); + if (a == TH_IFACE_OBJTYPE) return Task::currThread()->resId(); return 0; } else { if (ressource > size or ressources[ressource] == 0) { |