#include <oscl_thread.h>
Public Methods | |
OSCL_IMPORT_REF | OsclThread () |
OSCL_IMPORT_REF | ~OsclThread () |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | Create (TOsclThreadFuncPtr func, int32 stack_size, TOsclThreadFuncArg argument, OsclThread_State state=Start_on_creation) |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | GetPriority (OsclThreadPriority &refThreadPriority) |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | SetPriority (OsclThreadPriority ePriority) |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | Suspend () |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | Resume () |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | Terminate (OsclAny *exitcode) |
Static Public Methods | |
OSCL_IMPORT_REF void | Exit (OsclAny *exitcode) |
OSCL_IMPORT_REF void | EnableKill () |
OSCL_IMPORT_REF OsclProcStatus::eOsclProcError | GetId (TOsclThreadId &refThreadId) |
OSCL_IMPORT_REF bool | CompareId (TOsclThreadId &t1, TOsclThreadId &t2) |
OSCL_IMPORT_REF void | SleepMillisec (const int32 msec) |
|
Class constructor |
|
Class destructor |
|
Static routine to compare whether two thread ID's are equal.
|
|
This routine will create a thread. The thread may be launched immediately or may be created in a suspended state and launched with a Resume call.
|
|
EnableKill is a static function which can be called by the thread routine in order to enable thread termination without waiting for cancellation points. EnableKill only applies to pthread implementations. For other implementations this function will do nothing.
|
|
Exit is a static function which is used to end the current thread. When called it just ends the execution of the current thread.
|
|
Static routine to retrieve ID of calling thread.
|
|
GetThreadPriority gets the priority of the thread. It takes reference of the input argument and assigns priority to it from one of the already defined priorities.
|
|
ResumeThread resumes the suspended thread and brings it into execution.
|
|
SetThreadPriority sets the priority of the thread. It takes priority as the input argument and assigns it to the thread referred.
|
|
Suspend current thread execution for specified time.
|
|
This API suspends the thread being referred. The thread can later be brought into execution by calling OSCL_ResumeThread() on it.
|
|
Terminate a thread other than the calling thread. Note: for pthread implementations, the Terminate call will block until the thread has terminated. By default, threads will not terminate until a cancellation point is reached. The EnableKill method may be used to override this default behavior and allow immediate termination.
|