From: compudj Date: Thu, 9 Jun 2005 23:07:07 +0000 (+0000) Subject: compile fix X-Git-Tag: v0.12.20~2543 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6804757651dfd60d73e775926725bb60cfe70aea;p=lttv.git compile fix git-svn-id: http://ltt.polymtl.ca/svn@946 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttd/lttd.c b/ltt/branches/poly/lttd/lttd.c index fc4e4472..04c2ec19 100644 --- a/ltt/branches/poly/lttd/lttd.c +++ b/ltt/branches/poly/lttd/lttd.c @@ -275,6 +275,7 @@ int read_channels(struct channel_trace_fd *fd_pairs) struct pollfd *pollfd; int i; int num_rdy; + int high_prio; pollfd = malloc(fd_pairs->num_pairs * sizeof(struct pollfd)); @@ -284,7 +285,8 @@ int read_channels(struct channel_trace_fd *fd_pairs) } while(1) { - + high_prio = 0; + num_rdy = poll(pollfd, fd_pairs->num_pairs, -1); if(num_rdy == -1) { perror("Poll error"); @@ -306,16 +308,19 @@ int read_channels(struct channel_trace_fd *fd_pairs) break; case POLLPRI: /* Take care of high priority channels first. */ + high_prio = 1; break; - default: + } } - for(i=0;inum_pairs;i++) { - switch(pollfd[i].revents) { - case POLLIN: - /* Take care of low priority channels. */ - break; - default: + if(!high_prio) { + for(i=0;inum_pairs;i++) { + switch(pollfd[i].revents) { + case POLLIN: + /* Take care of low priority channels. */ + break; + } + } } }