28 #ifndef __ALSA_GLOBAL_H_
29 #define __ALSA_GLOBAL_H_
49 #ifndef ATTRIBUTE_UNUSED
51 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
57 #define __SND_DLSYM_VERSION(name, version) _ ## name ## version
62 #define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
66 struct snd_dlsym_link {
67 struct snd_dlsym_link *next;
68 const char *dlsym_name;
69 const void *dlsym_ptr;
72 extern struct snd_dlsym_link *snd_dlsym_start;
75 #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
80 #define SND_DLSYM_BUILD_VERSION(name, version) \
81 static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
82 void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
83 void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
84 __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
85 __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
86 __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
87 snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
94 #define __STRING(x) #x
98 #define SND_DLSYM_VERSION(version) __STRING(version)
101 void *
snd_dlsym(
void *handle,
const char *name,
const char *version);
106 #define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
137 #if !defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE)
void * snd_dlsym(void *handle, const char *name, const char *version)
Resolves a symbol from a dynamic library - ALSA wrapper for dlsym.
Definition: dlmisc.c:162
int snd_async_handler_get_signo(snd_async_handler_t *handler)
Returns the signal number assigned to an async handler.
Definition: async.c:179
void(* snd_async_callback_t)(snd_async_handler_t *handler)
Async notification callback.
Definition: global.h:121
int snd_async_add_handler(snd_async_handler_t **handler, int fd, snd_async_callback_t callback, void *private_data)
Registers an async handler.
Definition: async.c:94
const char * snd_asoundlib_version(void)
Returns the ALSA sound library version in ASCII format.
Definition: error.c:143
int snd_async_handler_get_fd(snd_async_handler_t *handler)
Returns the file descriptor assigned to an async handler.
Definition: async.c:190
int snd_shm_area_destroy(struct snd_shm_area *area)
Release the shared area record.
Definition: shmarea.c:85
struct timespec snd_htimestamp_t
Definition: global.h:153
struct snd_shm_area * snd_shm_area_create(int shmid, void *ptr)
Create a shm area record.
Definition: shmarea.c:50
void * snd_dlopen(const char *file, int mode)
Opens a dynamic library - ALSA wrapper for dlopen.
Definition: dlmisc.c:51
int snd_dlclose(void *handle)
Closes a dynamic library - ALSA wrapper for dlclose.
Definition: dlmisc.c:102
struct snd_shm_area * snd_shm_area_share(struct snd_shm_area *area)
Increase the reference counter of shm area record.
Definition: shmarea.c:69
struct _snd_async_handler snd_async_handler_t
Internal structure for an async notification client handler.
Definition: global.h:114
struct timeval snd_timestamp_t
Definition: global.h:151
int snd_user_file(const char *file, char **result)
Get the full file name.
Definition: userfile.c:65
void * snd_async_handler_get_callback_private(snd_async_handler_t *handler)
Returns the private data assigned to an async handler.
Definition: async.c:201
int snd_async_del_handler(snd_async_handler_t *handler)
Deletes an async handler.
Definition: async.c:131
void * ptr
Definition: seq_event.h:199