patch from "Freyensee, James P" <james.p.freyensee@intel.com>, but default is old implementation
This commit is contained in:
parent
e23c8c4750
commit
676d6225d4
2 changed files with 11 additions and 3 deletions
|
@ -126,7 +126,7 @@ class DXXAPI DefaultMutex
|
|||
{
|
||||
public:
|
||||
|
||||
DefaultMutex();
|
||||
DefaultMutex(bool recursive = false);
|
||||
|
||||
~DefaultMutex();
|
||||
|
||||
|
|
|
@ -75,9 +75,17 @@ DefaultWatch::~DefaultWatch()
|
|||
_disp->_mutex_w.unlock();
|
||||
}
|
||||
|
||||
DefaultMutex::DefaultMutex()
|
||||
DefaultMutex::DefaultMutex(bool recursive)
|
||||
{
|
||||
pthread_mutex_init(&_mutex, NULL);
|
||||
if (recursive)
|
||||
{
|
||||
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
||||
_mutex = recmutex;
|
||||
}
|
||||
else
|
||||
{
|
||||
pthread_mutex_init(&_mutex, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
DefaultMutex::~DefaultMutex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue