Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

global.h

Go to the documentation of this file.
00001 
00028 #ifndef __ALSA_GLOBAL_H_
00029 #define __ALSA_GLOBAL_H_
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00044 #ifndef ATTRIBUTE_UNUSED
00045 
00046 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
00047 #endif
00048 
00049 #ifdef PIC /* dynamic build */
00050 
00052 #define __SND_DLSYM_VERSION(name, version) _ ## name ## version
00053 
00057 #define SND_DLSYM_BUILD_VERSION(name, version) char __SND_DLSYM_VERSION(name, version);
00058 
00059 #else /* static build */
00060 
00061 struct snd_dlsym_link {
00062         struct snd_dlsym_link *next;
00063         const char *dlsym_name;
00064         const void *dlsym_ptr;
00065 };
00066 
00067 extern struct snd_dlsym_link *snd_dlsym_start;
00068 
00070 #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
00071 
00075 #define SND_DLSYM_BUILD_VERSION(name, version) \
00076   static struct snd_dlsym_link __SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00077   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
00078   void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
00079     __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
00080     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
00081     __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
00082     snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
00083   }
00084 
00085 #endif
00086 
00088 #define SND_DLSYM_VERSION(version) __STRING(version)
00089 
00090 void *snd_dlopen(const char *file, int mode);
00091 void *snd_dlsym(void *handle, const char *name, const char *version);
00092 int snd_dlclose(void *handle);
00093 
00094 
00101 typedef struct _snd_async_handler snd_async_handler_t;
00102 
00108 typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
00109 
00110 int snd_async_add_handler(snd_async_handler_t **handler, int fd, 
00111                           snd_async_callback_t callback, void *private_data);
00112 int snd_async_del_handler(snd_async_handler_t *handler);
00113 int snd_async_handler_get_fd(snd_async_handler_t *handler);
00114 int snd_async_handler_get_signo(snd_async_handler_t *handler);
00115 void *snd_async_handler_get_callback_private(snd_async_handler_t *handler);
00116 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif /* __ALSA_GLOBAL_H */

Generated on Thu Feb 27 11:30:36 2003 for ALSA project - the C library reference by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002