summaryrefslogtreecommitdiff
path: root/Source/Library/Userland
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-18 17:50:02 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-18 17:50:02 +0200
commiteb7b832d47bcbd74181028c62e871d407ba63a23 (patch)
tree29489cb58898c77860fe83118ef30689e131ae2d /Source/Library/Userland
parente589a45295a871f38d4a1d1f23b370b612f99be5 (diff)
downloadMelon-eb7b832d47bcbd74181028c62e871d407ba63a23.tar.gz
Melon-eb7b832d47bcbd74181028c62e871d407ba63a23.zip
More work on syscalls
Diffstat (limited to 'Source/Library/Userland')
-rw-r--r--Source/Library/Userland/Binding/Process.class.h19
-rw-r--r--Source/Library/Userland/Binding/Thread.class.h19
-rw-r--r--Source/Library/Userland/Binding/VirtualTerminal.class.h (renamed from Source/Library/Userland/VirtualTerminal.class.h)0
3 files changed, 38 insertions, 0 deletions
diff --git a/Source/Library/Userland/Binding/Process.class.h b/Source/Library/Userland/Binding/Process.class.h
new file mode 100644
index 0000000..c484e19
--- /dev/null
+++ b/Source/Library/Userland/Binding/Process.class.h
@@ -0,0 +1,19 @@
+#include <Syscall/RessourceCaller.class.h>
+
+#include <Process.iface.h>
+
+class Process : public RessourceCaller {
+ public:
+ static Process get() {
+ u32int id = RessourceCaller::getObjId(PR_IFACE_OBJTYPE);
+ return Process(id);
+ }
+ Process(u32int id) : RessourceCaller(id, PR_IFACE_OBJTYPE) {}
+
+ void exit() {
+ doCall(PR_IFACE_EXIT);
+ }
+ void allocPage(u32int pos) {
+ doCall(PR_IFACE_ALLOCPAGE, pos);
+ }
+};
diff --git a/Source/Library/Userland/Binding/Thread.class.h b/Source/Library/Userland/Binding/Thread.class.h
new file mode 100644
index 0000000..beef9c5
--- /dev/null
+++ b/Source/Library/Userland/Binding/Thread.class.h
@@ -0,0 +1,19 @@
+#include <Syscall/RessourceCaller.class.h>
+
+#include <Thread.iface.h>
+
+class Thread : public RessourceCaller {
+ public:
+ static Thread get() {
+ u32int id = RessourceCaller::getObjId(TH_IFACE_OBJTYPE);
+ return Thread(id);
+ }
+ Thread(u32int id) : RessourceCaller(id, TH_IFACE_OBJTYPE) {}
+
+ void sleep(u32int msecs) {
+ doCall(TH_IFACE_SLEEP, msecs);
+ }
+ void finish(u32int errcode) {
+ doCall(TH_IFACE_FINISH, errcode);
+ }
+};
diff --git a/Source/Library/Userland/VirtualTerminal.class.h b/Source/Library/Userland/Binding/VirtualTerminal.class.h
index a7bb4c2..a7bb4c2 100644
--- a/Source/Library/Userland/VirtualTerminal.class.h
+++ b/Source/Library/Userland/Binding/VirtualTerminal.class.h