Pyro higlevel API
|
Public Member Functions | |
Thread (const char *pzName, int nPriority=NORMAL_PRIORITY, int nStackSize=0) | |
Constructor. More... | |
virtual | ~Thread () |
void | Start () |
Begin/Resume execution. More... | |
void | Stop () |
Suspend execution. More... | |
void | WaitFor () |
Wait for thread. More... | |
void | Terminate () |
Kill thread unconditionally. More... | |
void | Initialize (const char *pzName, int nPriority=NORMAL_PRIORITY, int nStackSize=0) |
Reset thread. More... | |
void | SetPriority (int nPriority=IDLE_PRIORITY) |
Set priority. More... | |
int | GetPriority () |
Get priority. More... | |
thread_id | GetThreadId () |
Get thread ID. More... | |
proc_id | GetProcessId () |
Get process ID. More... | |
virtual int32 | Run (void)=0 |
Thread code. More... | |
Protected Member Functions | |
void | Delay (uint32 nMicros) |
Temporarily suspend thread execution. More... | |
Thread::Thread | ( | const char * | pzName, |
int | nPriority = NORMAL_PRIORITY , |
||
int | nStackSize = 0 |
||
) |
pzName | Name of the thread. |
nPriority | Thread priority (IDLE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, DISPLAY_PRIORITY, URGENT_DISPLAY_PRIORITY or REALTIME_PRIORITY). |
References Initialize().
|
virtual |
References Terminate().
|
protected |
nMicros | Delay time in microseconds. |
int Thread::GetPriority | ( | ) |
References EINVALIDTHREAD.
proc_id Thread::GetProcessId | ( | ) |
thread_id Thread::GetThreadId | ( | ) |
void Thread::Initialize | ( | const char * | pzName, |
int | nPriority = NORMAL_PRIORITY , |
||
int | nStackSize = 0 |
||
) |
pzName | Name of the thread. |
nPriority | Thread priority (IDLE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, DISPLAY_PRIORITY, URGENT_DISPLAY_PRIORITY or REALTIME_PRIORITY). |
nStackSize | Stack size, 0 means default (currently 128k). Minimum stack size is currently 32k. |
References Terminate().
Referenced by Thread().
|
pure virtual |
Implemented in MountDialogScanner.
void Thread::SetPriority | ( | int | nPriority = IDLE_PRIORITY | ) |
nPriority | Thread priority (IDLE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY, DISPLAY_PRIORITY, URGENT_DISPLAY_PRIORITY or REALTIME_PRIORITY). |
References EINVALIDTHREAD.
void Thread::Start | ( | void | ) |
References EINVALIDTHREAD.
void Thread::Stop | ( | void | ) |
References EINVALIDTHREAD.
void Thread::Terminate | ( | void | ) |
Referenced by Initialize(), and ~Thread().
void Thread::WaitFor | ( | void | ) |