#include <platformstl/synch/process_mutex.hpp>
The class is not actually defined in the platformstl namespace. Rather, it resolves to the appropriate type for the given platform, relying on Intersecting Conformance of the resolved platform-specific types.
When compiling on UNIX platforms, the platformstl::process_mutex type resolves to the unixstl::process_mutex class. On Windows platforms it resolves to the winstl::process_mutex class. It is not defined for other platforms.
Public Types | |
Member Types | |
typedef process_mutex | class_type |
typedef handle_type | resource_type |
Public Member Functions | |
Construction | |
process_mutex () | |
Constructs a mutex object. | |
~process_mutex () | |
Destroys a mutex object. | |
Operations | |
void | lock () |
Acquires a lock on the mutex, pending the thread until the lock is aquired. | |
bool | try_lock () |
Attempts to lock the mutex. | |
void | unlock () |
Releases an aquired lock on the mutex. | |
Accessors | |
handle_type | get () |
The underlying kernel object handle. |
process_mutex | ( | ) |
Constructs a mutex object.
~process_mutex | ( | ) |
Destroys a mutex object.
void lock | ( | ) |
Acquires a lock on the mutex, pending the thread until the lock is aquired.
bool try_lock | ( | ) |
Attempts to lock the mutex.
void unlock | ( | ) |
Releases an aquired lock on the mutex.
handle_type get | ( | ) |
The underlying kernel object handle.