Cross platform synchronization primitives. More...
Functions | |
HqBool | StartRIPOnNewThread (void) |
Create a thread and then call the function StartRip() to start a Harlequin Core RIP on it. More... | |
void | WaitForRIPThreadToExit (void) |
Wait for the RIP thread to exit. | |
void * | PKCreateSemaphore (int32 initialValue) |
Create a semaphore with an initial value. More... | |
HqBool | PKSignalSemaphore (void *semaHandle) |
Increment the value of a semaphore. More... | |
HqBool | PKWaitOnSemaphore (void *semaHandle) |
Wait on a semaphore. More... | |
void | PKDestroySemaphore (void *semaHandle) |
Free up the resources associated with the semaphore. More... | |
void | PKSemaFinish (void) |
Finish semaphore module, free up resources for remaining semaphores. | |
Cross platform synchronization primitives.
void* PKCreateSemaphore | ( | int32 | initialValue | ) |
Create a semaphore with an initial value.
initialValue | Initial value of the semaphore. |
void PKDestroySemaphore | ( | void * | semaHandle | ) |
Free up the resources associated with the semaphore.
semaHandle | Platform-specific handle to a semaphore created by PKCreateSemaphore(). |
HqBool PKSignalSemaphore | ( | void * | semaHandle | ) |
Increment the value of a semaphore.
semaHandle | Platform-specific handle to a semaphore created by PKCreateSemaphore(). |
If any threads are blocked in PKWaitOnSemaphore(), then wake them up.
TRUE | If the semaphore was incremented successfully; |
FALSE | otherwise. |
HqBool PKWaitOnSemaphore | ( | void * | semaHandle | ) |
Wait on a semaphore.
semaHandle | Platform-specific handle to a semaphore created by PKCreateSemaphore(). |
If the semaphore value is > 0 then decrement it and carry on. If it's already 0 then block until it is signalled with PKSignalSemaphore(), then decrement it and return.
TRUE | If the semaphore was decremented successfully; |
FALSE | otherwise. |
HqBool StartRIPOnNewThread | ( | void | ) |
Create a thread and then call the function StartRip() to start a Harlequin Core RIP on it.
TRUE | if the thread was created successfully; |
FALSE | if the thread was not created successfully. |