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