nlib
|
Simplest critical section. Not reentrant. More...
#include "nn/nlib/threading/CriticalSection.h"
Public Types | |
typedef nlib_mutex * | native_handle_type |
typedef to a pointer type to a native mutex. | |
Public Member Functions | |
constexpr | SimpleCriticalSection () noexcept=default |
Instantiates the object with default parameters (default constructor). | |
void | lock () noexcept NLIB_ACQUIRE() |
Gets a lock, and enters the critical section. Blocks until it can get a lock. | |
void | unlock () noexcept NLIB_RELEASE() |
Releases the lock, and exits the critical section. | |
NLIB_CHECK_RESULT bool | try_lock () noexcept NLIB_TRY_ACQUIRE(true) |
Gets a lock, and attempts to enter the critical section. More... | |
native_handle_type | native_handle () noexcept NLIB_RETURN_CAPABILITY(mutex_) |
Gets a pointer to a native type mutex. More... | |
Simplest critical section. Not reentrant.
std::mutex
in C++11. Definition at line 14 of file CriticalSection.h.
|
inlinenoexcept |
Gets a pointer to a native type mutex.
Definition at line 47 of file CriticalSection.h.
|
inlinenoexcept |
Gets a lock, and attempts to enter the critical section.
true
if a lock is acquired. Definition at line 40 of file CriticalSection.h.
© 2012-2016 Nintendo Co., Ltd. All rights reserved.