Compounds | |
struct | lfc::posixPAL::threads::__StartThreadInfo |
used to pass __threadProc needed information. More... | |
struct | lfc::posixPAL::threads::ThreadHandle |
posix thread handle type. More... | |
struct | lfc::posixPAL::threads::MutexHandle |
posix mutex handle type. More... | |
struct | lfc::posixPAL::threads::SemHandle |
posix semaphore handle type. More... | |
Typedefs | |
typedef ::pthread_key_t | TLSKey |
posix TLS key type. More... | |
Enumerations | |
enum | ErrorCodes { errOk, errGeneric } |
Functions | |
void * | __threadProc (void *) |
tool for using posix threads. More... | |
int | init () |
init threads PAL. More... | |
int | cleanup () |
cleanup threads PAL. More... | |
int | createThread (ThreadHandle &handle, void(*proc)(void *), void *pData) |
create a new thread. More... | |
int | closeThread (ThreadHandle &handle) |
close a thread handle. More... | |
int | getCurrentThread (ThreadHandle &handle) |
get current thread handle. More... | |
int | destroyThread (const ThreadHandle &handle) |
destroy a thread (terminate async). More... | |
int | joinThread (const ThreadHandle &handle) |
wait for a thread to terminate. More... | |
int | setThreadPriority (const ThreadHandle &handle, int priority) |
set thread priority. More... | |
int | yield () |
yield. More... | |
int | sleep (long miliseconds) |
suspends execution for a specified interval. More... | |
int | allocTLS (TLSKey &key) |
alloc new TLS. More... | |
int | freeTLS (TLSKey key) |
free TLS. More... | |
int | setTLS (TLSKey key, void *value) |
set TLS. More... | |
int | getTLS (TLSKey key, void *&value) |
get TLS. More... | |
int | createMutex (MutexHandle &handle) |
create a new mutex object. More... | |
int | closeMutex (MutexHandle &handle) |
close a mutex. More... | |
int | lockMutex (MutexHandle &handle) |
lock a mutex. More... | |
int | tryLockMutex (MutexHandle &handle, bool &bLocked) |
try to lock a mutex w/o blocking. More... | |
int | unlockMutex (MutexHandle &handle) |
unlock a mutex. More... | |
int | createSemaphore (SemHandle &handle, long count) |
create a new semaphore object. More... | |
int | closeSemaphore (SemHandle &handle) |
close a semaphore. More... | |
int | waitSemaphore (SemHandle &handle) |
wait a semaphore (lock). More... | |
int | tryWaitSemaphore (SemHandle &handle, bool &bLocked) |
wait a semaphore w/o blocking (lock). More... | |
int | postSemaphore (SemHandle &handle) |
post a semaphore (unlock). More... | |
const char * | message (int index) |
return the message coresponding to a return code. More... | |
Variables | |
const int | MAX_ERROR_CODE = 1 |
const char * | messagesTable [MAX_ERROR_CODE+1] |
const ThreadHandle | NULL_THREAD_HANDLE = ThreadHandle() |
a handle value designating an invalid thread handle. More... | |
const MutexHandle | NULL_MUTEX_HANDLE = MutexHandle() |
a handle value designating an invalid mutex handle. More... | |
const SemHandle | NULL_SEM_HANDLE = SemHandle() |
a handle value designating an invalid semaphore handle. More... | |
const int | priorityMin = -1 |
thread priority. More... | |
const int | priorityNormal = 0 |
thread priority. More... | |
const int | priorityMax = 1 |
thread priority. More... |
more detailed return codes
|
posix TLS key type.
|
|
|
|
tool for using posix threads.
|
|
init threads PAL.
|
|
cleanup threads PAL.
|
|
create a new thread.
|
|
close a thread handle.
|
|
get current thread handle.
|
|
destroy a thread (terminate async).
|
|
wait for a thread to terminate.
|
|
set thread priority.
|
|
yield.
|
|
suspends execution for a specified interval.
|
|
alloc new TLS.
|
|
free TLS.
|
|
set TLS.
|
|
get TLS.
|
|
create a new mutex object.
|
|
close a mutex.
|
|
lock a mutex.
|
|
try to lock a mutex w/o blocking.
|
|
unlock a mutex.
|
|
create a new semaphore object.
|
|
close a semaphore.
|
|
wait a semaphore (lock).
|
|
wait a semaphore w/o blocking (lock).
|
|
post a semaphore (unlock).
|
|
return the message coresponding to a return code.
|
|
|
|
Initial value: { "posixPAL::threads -- No error (ok)", "posixPAL::threads -- Generic error", } |
|
a handle value designating an invalid thread handle.
|
|
a handle value designating an invalid mutex handle.
|
|
a handle value designating an invalid semaphore handle.
|
|
thread priority.
|
|
thread priority.
|
|
thread priority.
|