From: compudj Date: Thu, 9 Jun 2005 23:07:07 +0000 (+0000) Subject: compile fix X-Git-Tag: 0.80~220 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4f45ea5540555cf50f9f2ac21a8ae46f8a3a8568;p=ltt-control.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 fc4e447..04c2ec1 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; + } + } } }