[BACK]Return to tty.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/tty.c between version 1.184 and 1.185

version 1.184, 2006/06/04 16:44:08 version 1.185, 2006/06/07 22:33:41
Line 1649  ttread(struct tty *tp, struct uio *uio, 
Line 1649  ttread(struct tty *tp, struct uio *uio, 
         struct proc     *p;          struct proc     *p;
         int             c, s, first, error, has_stime, last_cc;          int             c, s, first, error, has_stime, last_cc;
         long            lflag, slp;          long            lflag, slp;
         struct timeval  stime;          struct timeval  now, stime;
   
         stime.tv_usec = 0;      /* XXX gcc */          stime.tv_usec = 0;      /* XXX gcc */
         stime.tv_sec = 0;       /* XXX gcc */          stime.tv_sec = 0;       /* XXX gcc */
Line 1723  ttread(struct tty *tp, struct uio *uio, 
Line 1723  ttread(struct tty *tp, struct uio *uio, 
                         if (!has_stime) {                          if (!has_stime) {
                                 /* first character, start timer */                                  /* first character, start timer */
                                 has_stime = 1;                                  has_stime = 1;
                                 stime = time;                                  getmicrotime(&stime);
                                 slp = t;                                  slp = t;
                         } else if (qp->c_cc > last_cc) {                          } else if (qp->c_cc > last_cc) {
                                 /* got a character, restart timer */                                  /* got a character, restart timer */
                                 stime = time;                                  getmicrotime(&stime);
                                 slp = t;                                  slp = t;
                         } else {                          } else {
                                 /* nothing, check expiration */                                  /* nothing, check expiration */
                                 slp = t - diff(time, stime);                                  getmicrotime(&now);
                                   slp = t - diff(now, stime);
                         }                          }
                 } else {        /* m == 0 */                  } else {        /* m == 0 */
                         if (qp->c_cc > 0)                          if (qp->c_cc > 0)
                                 goto read;                                  goto read;
                         if (!has_stime) {                          if (!has_stime) {
                                 has_stime = 1;                                  has_stime = 1;
                                 stime = time;                                  getmicrotime(&stime);
                                 slp = t;                                  slp = t;
                         } else                          } else {
                                 slp = t - diff(time, stime);                                  getmicrotime(&now);
                                   slp = t - diff(now, stime);
                           }
                 }                  }
                 last_cc = qp->c_cc;                  last_cc = qp->c_cc;
 #undef diff  #undef diff

Legend:
Removed from v.1.184  
changed lines
  Added in v.1.185

CVSweb <webmaster@jp.NetBSD.org>