|
libhatchet
|
#include <hxthread.hpp>
Public Member Functions | |
| hxmutex (void) | |
| ~hxmutex (void) | |
| bool | lock (void) |
| bool | unlock (void) |
| inline::mtx_t * | native_handle (void) |
hxmutex - std::mutex style wrapper for the configured threading backend.
Default behavior is non-recursive and no translation layer.
|
inline |
Constructs a mutex and initializes it.
May not return if the mutex can't be initialized correctly. Something is very wrong if this fails.
|
inline |
Destroys the mutex.
|
inline |
Locks the mutex.
Returns true on success, asserts on invalid arguments, and returns false on failure. Callers must check the return value and avoid ignoring lock failures.
|
inline |
Returns a pointer to the native mutex handle.
|
inline |
Unlocks the mutex.
Returns true on success and false otherwise. It is undefined to unlock a mutex that you have not locked, and such an operation may succeed.