mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04: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
|
|
@ -74,5 +74,11 @@ extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
|
|||
}
|
||||
#endif
|
||||
|
||||
typedef void (*snd_local_error_handler_t)(const char *file, int line,
|
||||
const char *func, int err,
|
||||
const char *fmt, va_list arg);
|
||||
|
||||
snd_local_error_handler_t snd_lib_error_set_local(snd_local_error_handler_t func);
|
||||
|
||||
#endif /* __ALSA_ERROR_H */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue