]> git.alsa-project.org Git - alsa-lib.git/commit
conf.c: use portable way to initialize recursive mutex
authorTimo Teräs <timo.teras@iki.fi>
Fri, 8 Nov 2013 12:17:58 +0000 (13:17 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Nov 2013 13:55:58 +0000 (14:55 +0100)
commitae035b7fe5620fcaf4f5ea33ecabcf93b8e056cd
tree5285cd42fb69f9b50aa4808e7958cbb3f99da95c
parent7d06b3ed9fda0220c2863ee20acd10c32cf313fd
conf.c: use portable way to initialize recursive mutex

PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not in POSIX, as _NP
(non-portable) suggests.

exposing such a symbol in musl libc would lock in the ABI for all
times and makes it impossible to do future changes to the under-
lying struct without hideous symbol versioning hacks.

use the portable way instead: pthread_once was designed for such
cases.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Tested-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/conf.c