mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Use __inline__ for exported headers
Some programs are still using C90. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=817077 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
886f0cc3c2
commit
30122df4fa
5 changed files with 14 additions and 14 deletions
|
|
@ -234,7 +234,7 @@ int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t
|
|||
int snd_ctl_open_fallback(snd_ctl_t **ctl, snd_config_t *root, const char *name, const char *orig_name, int mode);
|
||||
int snd_ctl_close(snd_ctl_t *ctl);
|
||||
int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock);
|
||||
static inline int snd_ctl_abort(snd_ctl_t *ctl) { return snd_ctl_nonblock(ctl, 2); }
|
||||
static __inline__ int snd_ctl_abort(snd_ctl_t *ctl) { return snd_ctl_nonblock(ctl, 2); }
|
||||
int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl,
|
||||
snd_async_callback_t callback, void *private_data);
|
||||
snd_ctl_t *snd_async_handler_get_ctl(snd_async_handler_t *handler);
|
||||
|
|
@ -532,7 +532,7 @@ int snd_hctl_open(snd_hctl_t **hctl, const char *name, int mode);
|
|||
int snd_hctl_open_ctl(snd_hctl_t **hctlp, snd_ctl_t *ctl);
|
||||
int snd_hctl_close(snd_hctl_t *hctl);
|
||||
int snd_hctl_nonblock(snd_hctl_t *hctl, int nonblock);
|
||||
static inline int snd_hctl_abort(snd_hctl_t *hctl) { return snd_hctl_nonblock(hctl, 2); }
|
||||
static __inline__ int snd_hctl_abort(snd_hctl_t *hctl) { return snd_hctl_nonblock(hctl, 2); }
|
||||
int snd_hctl_poll_descriptors_count(snd_hctl_t *hctl);
|
||||
int snd_hctl_poll_descriptors(snd_hctl_t *hctl, struct pollfd *pfds, unsigned int space);
|
||||
int snd_hctl_poll_descriptors_revents(snd_hctl_t *ctl, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
||||
|
|
|
|||
|
|
@ -980,7 +980,7 @@ static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
|
|||
return result;
|
||||
}
|
||||
|
||||
static inline int atomic_add_negative(int i, volatile atomic_t *v)
|
||||
static __inline__ int atomic_add_negative(int i, volatile atomic_t *v)
|
||||
{
|
||||
unsigned long flags;
|
||||
int result;
|
||||
|
|
@ -1160,36 +1160,36 @@ typedef struct {
|
|||
|
||||
void snd_atomic_read_wait(snd_atomic_read_t *t);
|
||||
|
||||
static inline void snd_atomic_write_init(snd_atomic_write_t *w)
|
||||
static __inline__ void snd_atomic_write_init(snd_atomic_write_t *w)
|
||||
{
|
||||
w->begin = 0;
|
||||
w->end = 0;
|
||||
}
|
||||
|
||||
static inline void snd_atomic_write_begin(snd_atomic_write_t *w)
|
||||
static __inline__ void snd_atomic_write_begin(snd_atomic_write_t *w)
|
||||
{
|
||||
w->begin++;
|
||||
wmb();
|
||||
}
|
||||
|
||||
static inline void snd_atomic_write_end(snd_atomic_write_t *w)
|
||||
static __inline__ void snd_atomic_write_end(snd_atomic_write_t *w)
|
||||
{
|
||||
wmb();
|
||||
w->end++;
|
||||
}
|
||||
|
||||
static inline void snd_atomic_read_init(snd_atomic_read_t *r, snd_atomic_write_t *w)
|
||||
static __inline__ void snd_atomic_read_init(snd_atomic_read_t *r, snd_atomic_write_t *w)
|
||||
{
|
||||
r->write = w;
|
||||
}
|
||||
|
||||
static inline void snd_atomic_read_begin(snd_atomic_read_t *r)
|
||||
static __inline__ void snd_atomic_read_begin(snd_atomic_read_t *r)
|
||||
{
|
||||
r->end = r->write->end;
|
||||
rmb();
|
||||
}
|
||||
|
||||
static inline int snd_atomic_read_ok(snd_atomic_read_t *r)
|
||||
static __inline__ int snd_atomic_read_ok(snd_atomic_read_t *r)
|
||||
{
|
||||
rmb();
|
||||
return r->end == r->write->begin;
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ int snd_pcm_poll_descriptors_count(snd_pcm_t *pcm);
|
|||
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
|
||||
int snd_pcm_poll_descriptors_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
||||
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
|
||||
static inline int snd_pcm_abort(snd_pcm_t *pcm) { return snd_pcm_nonblock(pcm, 2); }
|
||||
static __inline__ int snd_pcm_abort(snd_pcm_t *pcm) { return snd_pcm_nonblock(pcm, 2); }
|
||||
int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm,
|
||||
snd_async_callback_t callback, void *private_data);
|
||||
snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler);
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ int snd_pcm_extplug_set_slave_param_minmax(snd_pcm_extplug_t *extplug, int type,
|
|||
/**
|
||||
* set the parameter constraint with a single value
|
||||
*/
|
||||
static inline int snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
|
||||
static __inline__ int snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
|
||||
{
|
||||
return snd_pcm_extplug_set_param_list(extplug, type, 1, &val);
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ static inline int snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, int type
|
|||
/**
|
||||
* set the parameter constraint for slave PCM with a single value
|
||||
*/
|
||||
static inline int snd_pcm_extplug_set_slave_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
|
||||
static __inline__ int snd_pcm_extplug_set_slave_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
|
||||
{
|
||||
return snd_pcm_extplug_set_slave_param_list(extplug, type, 1, &val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ int snd_use_case_mgr_reset(snd_use_case_mgr_t *uc_mgr);
|
|||
* \param list Returned allocated list
|
||||
* \return Number of list entries if success, otherwise a negative error code
|
||||
*/
|
||||
static inline int snd_use_case_card_list(const char **list[])
|
||||
static __inline__ int snd_use_case_card_list(const char **list[])
|
||||
{
|
||||
return snd_use_case_get_list(NULL, NULL, list);
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ static inline int snd_use_case_card_list(const char **list[])
|
|||
* \param list Returned list of verbs
|
||||
* \return Number of list entries if success, otherwise a negative error code
|
||||
*/
|
||||
static inline int snd_use_case_verb_list(snd_use_case_mgr_t *uc_mgr,
|
||||
static __inline__ int snd_use_case_verb_list(snd_use_case_mgr_t *uc_mgr,
|
||||
const char **list[])
|
||||
{
|
||||
return snd_use_case_get_list(uc_mgr, "_verbs", list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue