File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ unsigned equeue_tick(void)
40
40
// Mutex operations
41
41
int equeue_mutex_create (equeue_mutex_t * m )
42
42
{
43
- return pthread_mutex_init (m , 0 );
43
+ pthread_mutexattr_t attr ;
44
+ pthread_mutexattr_init (& attr );
45
+ pthread_mutexattr_settype (& attr , PTHREAD_MUTEX_RECURSIVE );
46
+ return pthread_mutex_init (m , & attr );
44
47
}
45
48
46
49
void equeue_mutex_destroy (equeue_mutex_t * m )
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ unsigned equeue_tick(void)
40
40
// Mutex operations
41
41
int equeue_mutex_create (equeue_mutex_t * m )
42
42
{
43
- return pthread_mutex_init (m , 0 );
43
+ pthread_mutexattr_t attr ;
44
+ pthread_mutexattr_init (& attr );
45
+ pthread_mutexattr_settype (& attr , PTHREAD_MUTEX_RECURSIVE );
46
+ return pthread_mutex_init (m , & attr );
44
47
}
45
48
46
49
void equeue_mutex_destroy (equeue_mutex_t * m )
You can’t perform that action at this time.
0 commit comments