OSDN Git Service

alsaloop: pcmjob.c: use portable way to initialize recursive mutex
authorJohn Spencer <maillist-alsa@barfooze.de>
Fri, 8 Nov 2013 12:59:41 +0000 (13:59 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Nov 2013 13:57:06 +0000 (14:57 +0100)
commit0616d87fbaae1d4a558104051cb5369504eb2068
treef31402293fde7ff8d9f77a1d47a33812a4c6dbde
parentf1e991e81350e9388ab6cf04a64ac4b4389a588c
alsaloop: pcmjob.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: John Spencer <maillist-alsa@barfooze.de>
Tested-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsaloop/pcmjob.c