A crossplatform synchronisation utiltiy.
More...
Detailed Description
A crossplatform synchronisation utiltiy.
Typedef Documentation
An opaque reference to the Plank ThreadSpinLock object.
Function Documentation
Create a Plank ThreadSpinLock object and return an oqaque reference to it.
- Returns:
- A Plank ThreadSpinLock object as an opaque reference or PLANK_NULL.
Create and intitialise a Plank ThreadSpinLock object and return an oqaque reference to it.
- Returns:
- A Plank ThreadSpinLock object as an opaque reference or PLANK_NULL.
Deinitialise a Plank ThreadSpinLock object.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
- Returns:
- PlankResult_OK if successful, otherwise an error code.
Destroy a Plank ThreadSpinLock object.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
- Returns:
- PlankResult_OK if successful, otherwise an error code.
Initialise a Plank ThreadSpinLock object.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
- Returns:
- PlankResult_OK if successful, otherwise an error code.
Obtain the lock.
This will block until the lock can be obtained. Be sure to release the lock using pl_ThreadSpinLock_Unlock() otherwise your application will freeze.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
Signal the lock.
[todo docs]
- Parameters:
-
p | The Plank ThreadSpinLock object. |
Tries to obtain the lock but doesn't block if this fails.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
- Returns:
true
if the lock was obtained, otherwise false
.
Release the lock.
- Parameters:
-
p | The Plank ThreadSpinLock object. |
- Returns:
- Returns PLANK_TRUE if the lock was unlocked.
Wait on the lock.
[todo docs]
- Parameters:
-
p | The Plank ThreadSpinLock object. |