Protium
Math and Design Features
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
Mutex.cxx
Go to the documentation of this file.
1
#include "
Protium/Threads/Mutex.h
"
2
3
Protium::Threads::Mutex::Mutex
() : fIsLocked(false){
4
pthread_mutex_init(&
fMtx
, 0);
5
}
6
7
void
Protium::Threads::Mutex::Lock
(){
8
pthread_mutex_lock(&fMtx);
9
fIsLocked =
true
;
10
}
11
12
void
Protium::Threads::Mutex::Unlock
(){
13
pthread_mutex_unlock(&fMtx);
14
fIsLocked =
false
;
15
}
16
17
bool
Protium::Threads::Mutex::IsLocked
(){
18
return
fIsLocked;
19
}
Protium::Threads::Mutex::fMtx
pthread_mutex_t fMtx
Definition:
Mutex.h:25
Protium::Threads::Mutex::Lock
void Lock()
Attempts to lock the mutex and blocks until mutex is available.
Definition:
Mutex.cxx:7
Mutex.h
Defines mutexes and policies to be used by threaded objects.
Protium::Threads::Mutex::Mutex
Mutex()
Definition:
Mutex.cxx:3
Protium::Threads::Mutex::IsLocked
bool IsLocked()
Definition:
Mutex.cxx:17
Protium::Threads::Mutex::Unlock
void Unlock()
Unlocks the mutex for the next usage.
Definition:
Mutex.cxx:12
Source
kjw_software
Protium
Threads
Mutex.cxx
Generated on Thu Oct 9 2014 07:12:43 for Protium by
1.8.6