Browse Source

Same Mutex change for DPF class

tags/1.9.7
falkTX 8 years ago
parent
commit
a8c815d456
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      source/modules/distrho/extra/Mutex.hpp

+ 7
- 1
source/modules/distrho/extra/Mutex.hpp View File

@@ -40,7 +40,12 @@ public:
Mutex() noexcept
: fMutex()
{
pthread_mutex_init(&fMutex, nullptr);
pthread_mutexattr_t atts;
pthread_mutexattr_init(&atts);
pthread_mutexattr_setprotocol(&atts, PTHREAD_PRIO_INHERIT);
pthread_mutexattr_settype(&atts, PTHREAD_MUTEX_NORMAL);
pthread_mutex_init(&fMutex, &atts);
pthread_mutexattr_destroy(&atts);
}

/*
@@ -104,6 +109,7 @@ public:
#else
pthread_mutexattr_t atts;
pthread_mutexattr_init(&atts);
pthread_mutexattr_setprotocol(&atts, PTHREAD_PRIO_INHERIT);
pthread_mutexattr_settype(&atts, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&fMutex, &atts);
pthread_mutexattr_destroy(&atts);


Loading…
Cancel
Save