A crossplatform synchronisation utiltiy.
More...
Detailed Description
A crossplatform synchronisation utiltiy.
Typedef Documentation
An opaque reference to the Plank SpinLock object.
Function Documentation
Create a Plank SpinLock object and return an oqaque reference to it.
- Returns:
- A Plank SpinLock object as an opaque reference or PLANK_NULL.
Create and intitialise a Plank SpinLock object and return an oqaque reference to it.
- Returns:
- A Plank SpinLock object as an opaque reference or PLANK_NULL.
Deinitialise a Plank SpinLock object.
- Parameters:
-
p | The Plank SpinLock object. |
- Returns:
- PlankResult_OK if successful, otherwise an error code.
Destroy a Plank SpinLock object.
- Parameters:
-
p | The Plank SpinLock object. |
- Returns:
- PlankResult_OK if successful, otherwise an error code.
Initialise a Plank SpinLock object.
- Parameters:
-
p | The Plank SpinLock 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_SpinLock_Unlock() otherwise your application will freeze.
- Parameters:
-
p | The Plank SpinLock object. |
Signal the lock.
[todo docs]
- Parameters:
-
p | The Plank SpinLock object. |
Tries to obtain the lock but doesn't block if this fails.
- Parameters:
-
p | The Plank SpinLock object. |
- Returns:
true
if the lock was obtained, otherwise false
.
Release the lock.
- Parameters:
-
p | The Plank SpinLock object. |
Wait on the lock.
[todo docs]
- Parameters:
-
p | The Plank SpinLock object. |