#include <winstl/synch/process_mutex.hpp>
Public Types | |
Member Types | |
typedef process_mutex | class_type |
This type. | |
typedef HANDLE | synch_handle_type |
typedef HANDLE | resource_type |
Public Member Functions | |
Construction | |
process_mutex () | |
Creates an instance of the mutex. | |
process_mutex (HANDLE mx, bool bTakeOwnership) | |
Conversion constructor. | |
process_mutex (char const *name) | |
Creates an instance of the mutex. | |
process_mutex (wchar_t const *name) | |
Creates an instance of the mutex. | |
process_mutex (bool bInitialOwer) | |
Creates an instance of the mutex. | |
process_mutex (char const *name, bool bInitialOwer) | |
Creates an instance of the mutex. | |
process_mutex (wchar_t const *name, bool bInitialOwer) | |
Creates an instance of the mutex. | |
process_mutex (char const *name, bool bInitialOwer, LPSECURITY_ATTRIBUTES psa) | |
Creates an instance of the mutex. | |
process_mutex (wchar_t const *name, bool bInitialOwer, LPSECURITY_ATTRIBUTES psa) | |
Creates an instance of the mutex. | |
~process_mutex () throw () | |
Destroys an instance of the mutex. | |
Operations | |
void | lock () |
Acquires a lock on the mutex, pending the thread until the lock is aquired. | |
bool | lock (ws_dword_t wait) |
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 | handle () |
The underlying kernel object handle. | |
HANDLE | get () |
The underlying kernel object handle. | |
Attributes | |
bool | created () const |
Indicates whether this object instance created the underlying mutex object. | |
bool | abandoned () const |
Indicates whether a successful call to lock occurred because the underlying mutex was previously held by a thread that abandoned. |
typedef process_mutex class_type |
This type.
process_mutex | ( | ) | [inline] |
Creates an instance of the mutex.
process_mutex | ( | HANDLE | mx, | |
bool | bTakeOwnership | |||
) | [inline] |
process_mutex | ( | char const * | name | ) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | wchar_t const * | name | ) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | bool | bInitialOwer | ) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | char const * | name, | |
bool | bInitialOwer | |||
) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | wchar_t const * | name, | |
bool | bInitialOwer | |||
) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | char const * | name, | |
bool | bInitialOwer, | |||
LPSECURITY_ATTRIBUTES | psa | |||
) | [inline, explicit] |
Creates an instance of the mutex.
process_mutex | ( | wchar_t const * | name, | |
bool | bInitialOwer, | |||
LPSECURITY_ATTRIBUTES | psa | |||
) | [inline, explicit] |
Creates an instance of the mutex.
~process_mutex | ( | ) | throw () [inline] |
Destroys an instance of the mutex.
void lock | ( | ) | [inline] |
Acquires a lock on the mutex, pending the thread until the lock is aquired.
References WINSTL_ASSERT.
bool lock | ( | ws_dword_t | wait | ) | [inline] |
Acquires a lock on the mutex, pending the thread until the lock is aquired.
References WINSTL_ASSERT.
bool try_lock | ( | ) | [inline] |
Attempts to lock the mutex.
void unlock | ( | ) | [inline] |
HANDLE handle | ( | ) | [inline] |
The underlying kernel object handle.
HANDLE get | ( | ) | [inline] |
The underlying kernel object handle.
Referenced by winstl::get_kernel_handle(), and winstl::get_synch_handle().
bool created | ( | ) | const [inline] |
Indicates whether this object instance created the underlying mutex object.
false The mutex object was not created by this instance
bool abandoned | ( | ) | const [inline] |
Indicates whether a successful call to lock occurred because the underlying mutex was previously held by a thread that abandoned.
false The mutex object was not abandoned by its previous owning thread