fix poll timeout

Use an infinite poll timeout to prevent unnecessary wakeups.
This commit is contained in:
Clemens Ladisch 2008-02-21 09:12:27 +01:00
parent 8497258145
commit 23f3e570cc
2 changed files with 2 additions and 2 deletions

View file

@ -857,7 +857,7 @@ int main(int argc, char *argv[])
pfds = alloca(sizeof(*pfds) * npfds); pfds = alloca(sizeof(*pfds) * npfds);
for (;;) { for (;;) {
snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN); snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN);
if (poll(pfds, npfds, 69) < 0) if (poll(pfds, npfds, -1) < 0)
break; break;
do { do {
snd_seq_event_t *event; snd_seq_event_t *event;

View file

@ -418,7 +418,7 @@ int main(int argc, char *argv[])
pfds = alloca(sizeof(*pfds) * npfds); pfds = alloca(sizeof(*pfds) * npfds);
for (;;) { for (;;) {
snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN); snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN);
if (poll(pfds, npfds, 69) < 0) if (poll(pfds, npfds, -1) < 0)
break; break;
do { do {
snd_seq_event_t *event; snd_seq_event_t *event;