summaryrefslogtreecommitdiff
path: root/Source/Library/Userland
diff options
context:
space:
mode:
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