summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/Binding/Thread.class.h
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/Binding/Thread.class.h
parente589a45295a871f38d4a1d1f23b370b612f99be5 (diff)
downloadMelon-eb7b832d47bcbd74181028c62e871d407ba63a23.tar.gz
Melon-eb7b832d47bcbd74181028c62e871d407ba63a23.zip
More work on syscalls
Diffstat (limited to 'Source/Library/Userland/Binding/Thread.class.h')
-rw-r--r--Source/Library/Userland/Binding/Thread.class.h19
1 files changed, 19 insertions, 0 deletions
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);
+ }
+};