diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-18 17:17:36 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-18 17:17:36 +0200 |
commit | e589a45295a871f38d4a1d1f23b370b612f99be5 (patch) | |
tree | b59f1190633368d78b23d78e011c99fa8fa3cc90 /Source/Library/Userland/Syscall/RessourceCaller.class.cpp | |
parent | 323e12f1f9ab33df15dcfed210e807561d98fa8c (diff) | |
download | Melon-e589a45295a871f38d4a1d1f23b370b612f99be5.tar.gz Melon-e589a45295a871f38d4a1d1f23b370b612f99be5.zip |
Syscall interface starts being implemented !
Diffstat (limited to 'Source/Library/Userland/Syscall/RessourceCaller.class.cpp')
-rw-r--r-- | Source/Library/Userland/Syscall/RessourceCaller.class.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Library/Userland/Syscall/RessourceCaller.class.cpp b/Source/Library/Userland/Syscall/RessourceCaller.class.cpp new file mode 100644 index 0000000..2d7b6ba --- /dev/null +++ b/Source/Library/Userland/Syscall/RessourceCaller.class.cpp @@ -0,0 +1,18 @@ +#include "RessourceCaller.class.h" + +RessourceCaller::RessourceCaller(u32int id, u32int type) { + m_id = id; + m_type = 1; + m_type = doCall(0); + if (m_type != type) m_type = 0; +} + +u32int RessourceCaller::getObjId(u32int type) { + return syscall(0xFFFFFE00, type); +} + +u32int RessourceCaller::doCall(u8int call, u32int a, u32int b, u32int c, u32int d, u32int e) { + if (m_type == 0) return (u32int) - 1; //Type 0 = invalid object + u32int x = ((m_id << 8) | call); + return syscall(x, a, b, c, d, e); +} |