#include <mongomutex.h>
Public Member Functions | |
| void | assertAtLeastReadLocked () const |
| void | assertWriteLocked () const |
| bool | atLeastReadLocked () const |
| int | getState () const |
| MutexInfo & | info () |
| bool | isWriteLocked () const |
| void | lock () |
| void | lock_shared () |
| bool | lock_shared_try (int millis) |
| bool | lock_try (int millis) |
| MongoMutex (const char *name) | |
| void | releaseEarly () |
| void | unlock () |
| void | unlock_shared () |
Public Attributes | |
| bool | _remapPrivateViewRequested |
Private Member Functions | |
| void | _acquiredWriteLock () |
| void | _releasingWriteLock () |
| bool | _writeLockedAlready () |
Private Attributes | |
| RWLock | _m |
| MutexInfo | _minfo |
| ThreadLocalValue< bool > | _releasedEarly |
| ThreadLocalValue< int > | _state |
the 'big lock' we use for most operations. a read/write lock. there is one of these, dbMutex.
generally if you need to declare a mutex use the right primitive class, not this.
use readlock and writelock classes for scoped locks on this rather than direct manipulation.
Definition at line 33 of file mongomutex.h.
| mongo::MongoMutex::MongoMutex | ( | const char * | name | ) |
| void mongo::MongoMutex::_acquiredWriteLock | ( | ) | [inline, private] |
Definition at line 221 of file mongomutex.h.
| void mongo::MongoMutex::_releasingWriteLock | ( | ) | [inline, private] |
Definition at line 217 of file mongomutex.h.
| bool mongo::MongoMutex::_writeLockedAlready | ( | ) | [inline, private] |
Definition at line 229 of file mongomutex.h.
| void mongo::MongoMutex::assertAtLeastReadLocked | ( | ) | const [inline] |
Definition at line 45 of file mongomutex.h.
| void mongo::MongoMutex::assertWriteLocked | ( | ) | const [inline] |
Definition at line 47 of file mongomutex.h.
| bool mongo::MongoMutex::atLeastReadLocked | ( | ) | const [inline] |
Definition at line 44 of file mongomutex.h.
| int mongo::MongoMutex::getState | ( | ) | const [inline] |
Definition at line 42 of file mongomutex.h.
| MutexInfo& mongo::MongoMutex::info | ( | ) | [inline] |
Definition at line 176 of file mongomutex.h.
| bool mongo::MongoMutex::isWriteLocked | ( | ) | const [inline] |
Definition at line 46 of file mongomutex.h.
| void mongo::MongoMutex::lock | ( | ) | [inline] |
Definition at line 53 of file mongomutex.h.
| void mongo::MongoMutex::lock_shared | ( | ) | [inline] |
Definition at line 121 of file mongomutex.h.
| bool mongo::MongoMutex::lock_shared_try | ( | int | millis | ) | [inline] |
Definition at line 142 of file mongomutex.h.
| bool mongo::MongoMutex::lock_try | ( | int | millis | ) | [inline] |
Definition at line 71 of file mongomutex.h.
| void mongo::MongoMutex::releaseEarly | ( | ) | [inline] |
Definition at line 113 of file mongomutex.h.
| void mongo::MongoMutex::unlock | ( | ) | [inline] |
Definition at line 90 of file mongomutex.h.
| void mongo::MongoMutex::unlock_shared | ( | ) | [inline] |
Definition at line 160 of file mongomutex.h.
RWLock mongo::MongoMutex::_m [private] |
Definition at line 185 of file mongomutex.h.
MutexInfo mongo::MongoMutex::_minfo [private] |
Definition at line 192 of file mongomutex.h.
ThreadLocalValue<bool> mongo::MongoMutex::_releasedEarly [private] |
Definition at line 202 of file mongomutex.h.
Definition at line 196 of file mongomutex.h.
ThreadLocalValue<int> mongo::MongoMutex::_state [private] |
Definition at line 190 of file mongomutex.h.