mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-25 01:40:10 -05:00
Add snd_lib_error_set_local() to install a thread-local error handler.
This is required so we can make other functions reentrant (such as snd_device_name_hint()). The default error handling function snd_lib_error_default() now checks if a local handler exists, and if so, calls it. Otherwise, the previous behavior is unchanged. Signed-off-by: Jerome Forissier <jerome@taodyne.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2cfc8b9b44
commit
44c1a623dd
3 changed files with 39 additions and 1 deletions
10
configure.in
10
configure.in
|
|
@ -281,6 +281,16 @@ else
|
|||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl Check for __thread
|
||||
AC_MSG_CHECKING([for __thread])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
|
||||
#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
|
||||
#endif], [static __thread int p = 0])],
|
||||
[AC_DEFINE(HAVE___THREAD, 1,
|
||||
Define to 1 if compiler supports __thread)
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
dnl Check for librt
|
||||
AC_MSG_CHECKING(for librt)
|
||||
AC_ARG_WITH(librt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue