mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
conf: Check the availability of PTHREAD_MUTEX_RECURSIVE
Check the availability of PTHREAD_MUTEX_RECURSIVE in configure script and use it only when possible. A fairly old version of glibc still seems working, but just to be sure. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
3cf3fbebdd
commit
e757a95fc9
3 changed files with 13 additions and 0 deletions
|
|
@ -490,7 +490,9 @@ static void snd_config_init_mutex(void)
|
|||
pthread_mutexattr_t attr;
|
||||
|
||||
pthread_mutexattr_init(&attr);
|
||||
#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#endif
|
||||
pthread_mutex_init(&snd_config_update_mutex, &attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue