From eb7b832d47bcbd74181028c62e871d407ba63a23 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 18 Oct 2009 17:50:02 +0200 Subject: More work on syscalls --- Source/Library/Userland/Binding/Thread.class.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Source/Library/Userland/Binding/Thread.class.h (limited to 'Source/Library/Userland/Binding/Thread.class.h') 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 + +#include + +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); + } +}; -- cgit v1.2.3