More generic support for poll descriptors

This commit is contained in:
Abramo Bagnara 2001-02-12 23:51:49 +00:00
parent a86efa083c
commit 460660d4b4
25 changed files with 162 additions and 68 deletions

View file

@ -74,7 +74,7 @@ int snd_timer_close(snd_timer_t *handle)
return res;
}
int snd_timer_poll_descriptor(snd_timer_t *handle)
int _snd_timer_poll_descriptor(snd_timer_t *handle)
{
snd_timer_t *tmr;
@ -84,6 +84,16 @@ int snd_timer_poll_descriptor(snd_timer_t *handle)
return tmr->fd;
}
int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned int space)
{
assert(timer);
if (space >= 1) {
pfds->fd = timer->fd;
pfds->events = POLLIN;
}
return 1;
}
int snd_timer_next_device(snd_timer_t *handle, snd_timer_id_t * tid)
{
snd_timer_t *tmr;