blob: 1588d8ce3a74c0596428445611646b57dd3f05e6 (
plain) (
tree)
|
|
#ifndef DEF_THREAD_CLASS_H
#define DEF_THREAD_CLASS_H
#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);
}
};
#endif
|