92 enum Priority{kPLow, kPBelowNormal, kPNormal, kPAboveNormal, kPRealTime};
135 void join(
bool killFirst =
false);
141 void setPriority(
Priority priority);
149 void setAffinity(
int cpu = 0);
154 bool isCreating()
const;
159 bool isRunning()
const;
169 bool isKilled()
const;
194 virtual void mainLoop() = 0;
223 void applyPriority();
239 const bool & CreateDetached =
false,
240 const unsigned int & StackSize = 0,
241 const bool & CancelEnable =
false,
242 const bool & CancelAsync =
false 260 enum State{kSIdle, kSCreating, kSRunning, kSKilled};
270 #endif // UTHREADNODE_H
static int Detach(Handle H)
static int Create(const Handler &Function, Thread_C_R Param, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false)
static int Detach(Handle H)
Handle getThreadHandle() const
static int Join(Handle H)
virtual void ThreadMain(Thread_R)=0
static int Kill(Handle H)
static int Kill(Handle H)
virtual void mainLoopBegin()
virtual void mainLoopKill()
static int Join(Handle H)
virtual void mainLoopEnd()
static void applyAffinity(Mem *pRec, char affinity, u8 enc)
unsigned long getThreadId() const
void operator=(UThread &)
static unsigned long currentThreadId()