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

global.h

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 
00087 #ifndef __STRING
00088 
00089 #define __STRING(x)     #x
00090 #endif
00091 
00093 #define SND_DLSYM_VERSION(version) __STRING(version)
00094 
00095 void *snd_dlopen(const char *file, int mode);
00096 void *snd_dlsym(void *handle, const char *name, const char *version);
00097 int snd_dlclose(void *handle);
00098 
00099 
00106 typedef struct _snd_async_handler snd_async_handler_t;
00107 
00113 typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
00114 
00115 int snd_async_add_handler(snd_async_handler_t **handler, int fd, 
00116                           snd_async_callback_t callback, void *private_data);
00117 int snd_async_del_handler(snd_async_handler_t *handler);
00118 int snd_async_handler_get_fd(snd_async_handler_t *handler);
00119 int snd_async_handler_get_signo(snd_async_handler_t *handler);
00120 void *snd_async_handler_get_callback_private(snd_async_handler_t *handler);
00121 
00122 struct snd_shm_area *snd_shm_area_create(int shmid, void *ptr);
00123 struct snd_shm_area *snd_shm_area_share(struct snd_shm_area *area);
00124 int snd_shm_area_destroy(struct snd_shm_area *area);
00125 
00126 int snd_user_file(const char *file, char **result);
00127 
00129 typedef struct timeval snd_timestamp_t;
00131 typedef struct timespec snd_htimestamp_t;
00132 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif /* __ALSA_GLOBAL_H */

Generated on Mon May 3 16:15:21 2004 for ALSA project - the C library reference by doxygen 1.3.6