Home | History | Annotate | Download | only in utils

Lines Matching refs:Mutex

37  * Simple mutex class.  The implementation is system-dependent.
39 * The mutex must be unlocked by the thread that locked it. They are not
42 class Mutex {
49 Mutex();
50 Mutex(const char* name);
51 Mutex(int type, const char* name = NULL);
52 ~Mutex();
54 // lock or unlock the mutex
61 // Manages the mutex automatically. It'll be locked when Autolock is
65 inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
66 inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
69 Mutex& mLock;
75 // A mutex cannot be copied
76 Mutex(const Mutex&);
77 Mutex& operator = (const Mutex&);
91 inline Mutex::Mutex() {
94 inline Mutex::Mutex(const char* name) {
97 inline Mutex::Mutex(int type, const char* name) {
108 inline Mutex::~Mutex() {
111 inline status_t Mutex::lock() {
114 inline void Mutex::unlock() {
117 inline status_t Mutex::tryLock() {
126 * Automatic mutex. Declare one of these at the top of a function.
128 * mutex.
131 typedef Mutex::Autolock AutoMutex;