We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c63a294 commit 4bcf835Copy full SHA for 4bcf835
src/lock/Mutex.c
@@ -30,6 +30,7 @@ int swMutex_create(swLock *lock, int use_in_process)
30
if (use_in_process == 1)
31
{
32
pthread_mutexattr_setpshared(&lock->object.mutex.attr, PTHREAD_PROCESS_SHARED);
33
+ pthread_mutexattr_setrobust_np(&lock->object.mutex.attr, PTHREAD_MUTEX_ROBUST_NP);
34
}
35
if ((ret = pthread_mutex_init(&lock->object.mutex._lock, &lock->object.mutex.attr)) < 0)
36
@@ -95,5 +96,6 @@ int swMutex_lockwait(swLock *lock, int timeout_msec)
95
96
97
static int swMutex_free(swLock *lock)
98
99
+ pthread_mutexattr_destroy(&lock->object.mutex.attr);
100
return pthread_mutex_destroy(&lock->object.mutex._lock);
101
0 commit comments