mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-19 14:27:05 -04:00
Merge branch 'storageareas' into zma_to_thread
This commit is contained in:
@@ -97,6 +97,15 @@ bool Mutex::locked() {
|
||||
return( state == EBUSY );
|
||||
}
|
||||
|
||||
RecursiveMutex::RecursiveMutex() {
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
|
||||
if ( pthread_mutex_init(&mMutex, &attr) < 0 )
|
||||
Error("Unable to create pthread mutex: %s", strerror(errno));
|
||||
}
|
||||
|
||||
Condition::Condition( Mutex &mutex ) : mMutex( mutex ) {
|
||||
if ( pthread_cond_init( &mCondition, NULL ) < 0 )
|
||||
Fatal( "Unable to create pthread condition: %s", strerror(errno) );
|
||||
|
||||
Reference in New Issue
Block a user