Compounds | |
| struct | lfc::win32PAL::threads::__StartThreadInfo |
| used to pass __threadProc needed information. More... | |
Typedefs | |
| typedef ::HANDLE | ThreadHandle |
| Win32 thread handle type. More... | |
| typedef ::HANDLE | MutexHandle |
| Win32 mutex handle type. More... | |
| typedef ::HANDLE | SemHandle |
| Win32 semaphore handle type. More... | |
| typedef DWORD | TLSKey |
| Win32 TLS key type. More... | |
Enumerations | |
| enum | ErrorCodes { errOk, errGeneric } |
Functions | |
| DWORD WINAPI | __threadProc (void *) |
| starting point for win32 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) |
| destory 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) |
| lock a mutex. 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) |
| try to 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 = NULL |
| a handle value designating an invalid thread handle. More... | |
| const MutexHandle | NULL_MUTEX_HANDLE = NULL |
| a handle value designating an invalid mutex handle. More... | |
| const SemHandle | NULL_SEM_HANDLE = NULL |
| a handle value designating an invalid semaphore handle. More... | |
| const int | priorityMin = THREAD_PRIORITY_LOWEST |
| thread priority. More... | |
| const int | priorityNormal = THREAD_PRIORITY_NORMAL |
| thread priority. More... | |
| const int | priorityMax = THREAD_PRIORITY_HIGHEST |
| thread priority. More... | |
more detailed return codes
|
|
Win32 thread handle type.
|
|
|
Win32 mutex handle type.
|
|
|
Win32 semaphore handle type.
|
|
|
Win32 TLS key type.
|
|
|
|
|
|
starting point for win32 threads.
|
|
|
init threads PAL.
|
|
|
cleanup threads PAL.
|
|
||||||||||||||||
|
create a new thread.
|
|
|
close a thread handle.
|
|
|
get current thread handle.
|
|
|
destory 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.
|
|
||||||||||||
|
lock a mutex.
|
|
|
unlock a mutex.
|
|
||||||||||||
|
create a new semaphore object.
|
|
|
close a semaphore.
|
|
|
wait a semaphore (lock).
|
|
||||||||||||
|
try to wait a semaphore w/o blocking (lock).
|
|
|
post a semaphore (unlock).
|
|
|
return the message coresponding to a return code.
|
|
|
|
|
|
Initial value:
{
"win32PAL::threads -- No error (ok)",
"win32PAL::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.
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001