summaryrefslogblamecommitdiff
path: root/Source/Library/Userland/Binding/Thread.class.h
blob: a19c256c8d93fb2d31b2b9547c60e6e0329b3867 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                          
                                                                               

                                  
                                                                

                                  
                                          

                                     
                                             

         
#include <Syscall/RessourceCaller.class.h>

#include <Thread.iface.h>

class Thread : public RessourceCaller {
	public:
	static Thread get() {
		u32int id = RessourceCaller::sCall(THIF_OBJTYPE, THIF_SGETCTH);
		return Thread(id);
	}
	Thread(u32int id) : RessourceCaller(id, THIF_OBJTYPE) {}

	void sleep(u32int msecs) {
		doCall(THIF_SLEEP, msecs);
	}
	void finish(u32int errcode) {
		doCall(THIF_FINISH, errcode);
	}
};