Cross-platform threading.
More...
#include <LSHThreadLib.h>
List of all members.
Static Public Member Functions |
static LSBOOL LSE_CALL | CreateThread (LSH_THREAD_PROC _pfProc, LSVOID *_lpParameter, LSH_THREAD *_ptReturnHandle) |
static LSBOOL LSE_CALL | CloseThread (LSH_THREAD &_tReturnHandle) |
static LSBOOL LSE_CALL | WaitForThread (const LSH_THREAD &_tThread, LSUINT32 *_pui32RetVal) |
static LSH_THREAD LSE_CALL | GetCurThread () |
static LSE_INLINE LSVOID LSE_CALL | MakeInvalidHandle (LSH_THREAD &_tHandle) |
static LSE_INLINE LSBOOL LSE_CALL | ThreadHandleIsValid (const LSH_THREAD &_tHandle) |
Detailed Description
Cross-platform threading.
Class CThreadLib Description: Cross-platform threading.
Member Function Documentation
static LSBOOL LSE_CALL lsh::CThreadLib::CloseThread |
( |
LSH_THREAD & |
_tReturnHandle | ) |
[static] |
Close the handle to a thread. Does not cause the thread to stop. The handle must not be closed more than once.
- Parameters:
-
_tReturnHandle | The handle to close. |
- Returns:
- Returns true if the given handle is valid.
static LSBOOL LSE_CALL lsh::CThreadLib::CreateThread |
( |
LSH_THREAD_PROC |
_pfProc, |
|
|
LSVOID * |
_lpParameter, |
|
|
LSH_THREAD * |
_ptReturnHandle |
|
) |
| [static] |
Create a new thread. _ptReturnHandle can be NULL if the handle for the thread is not needed.
- Parameters:
-
_pfProc | Function pointer where the thread begins. |
_lpParameter | Parameter to pass to the function on the new thread. |
_ptReturnHandle | Returned handle of the thread. |
- Returns:
- Returns true if the thread was created.
static LSH_THREAD LSE_CALL lsh::CThreadLib::GetCurThread |
( |
| ) |
[static] |
Get a handle to the current thread.
- Returns:
- Returns a handle to the current thread. The handle should not be closed.
LSE_INLINE LSVOID LSE_CALL lsh::CThreadLib::MakeInvalidHandle |
( |
LSH_THREAD & |
_tHandle | ) |
[static] |
Make a thread handle invalid.
- Parameters:
-
_tHandle | The handle to make invalid. |
LSE_INLINE LSBOOL LSE_CALL lsh::CThreadLib::ThreadHandleIsValid |
( |
const LSH_THREAD & |
_tHandle | ) |
[static] |
Is the thread handle valid?
- Parameters:
-
_tHandle | The handle to check for being valid. |
- Returns:
- Returns true if the given thread handle is valid.
static LSBOOL LSE_CALL lsh::CThreadLib::WaitForThread |
( |
const LSH_THREAD & |
_tThread, |
|
|
LSUINT32 * |
_pui32RetVal |
|
) |
| [static] |
Wait for a thread to finish and get its return value. The return value of the other thread is given in LSUINT32 form as the return of this function.
- Parameters:
-
_tThread | The thread for which to wait. |
_pui32RetVal | Return value from the thread. |
- Returns:
- Returns true if the given thread is valid.
The documentation for this class was generated from the following file: