[BACK]Return to file.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Diff for /src/usr.bin/sndiod/file.c between version 1.12 and 1.13

version 1.12, 2015/08/01 10:47:30 version 1.13, 2015/08/11 16:43:04
Line 64 
Line 64 
 void timo_update(unsigned int);  void timo_update(unsigned int);
 void timo_init(void);  void timo_init(void);
 void timo_done(void);  void timo_done(void);
   void file_process(struct file *, struct pollfd *);
   
 struct timespec file_ts;  struct timespec file_ts;
 struct file *file_list;  struct file *file_list;
Line 316 
Line 317 
         int i;          int i;
 #endif  #endif
         long long delta_nsec;          long long delta_nsec;
         int nfds, res;          int nfds, res, timo;
   
         log_flush();          log_flush();
   
Line 380 
Line 381 
         }          }
   
         /*          /*
          * sleep           * Sleep. Calculate the number off milliseconds poll(2) must
            * wait before the timo_update() needs to be called. If there're
            * no timeouts scheduled, then call poll(2) with -1 timeout.
          */           */
 #ifdef DEBUG  #ifdef DEBUG
         clock_gettime(CLOCK_MONOTONIC, &sleepts);          clock_gettime(CLOCK_MONOTONIC, &sleepts);
         file_utime += 1000000000LL * (sleepts.tv_sec - file_ts.tv_sec);          file_utime += 1000000000LL * (sleepts.tv_sec - file_ts.tv_sec);
         file_utime += sleepts.tv_nsec - file_ts.tv_nsec;          file_utime += sleepts.tv_nsec - file_ts.tv_nsec;
 #endif  #endif
         res = poll(pfds, nfds, TIMER_MSEC);          if (timo_queue != NULL) {
                   timo = ((int)timo_queue->val - (int)timo_abstime) / 1000;
                   if (timo < TIMER_MSEC)
                           timo = TIMER_MSEC;
           } else
                   timo = -1;
           res = poll(pfds, nfds, timo);
         if (res < 0) {          if (res < 0) {
                 if (errno != EINTR)                  if (errno != EINTR)
                         err(1, "poll");                          err(1, "poll");

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13