Subject: patch for serial version of tcsendbreak
From: Bob Wilson <[email-masked]>
To: [email-masked]
Date: Tue, 08 Aug 2000 11:40:20 -0700

There is a serious problem in the serial version of tcsendbreak. The
argument to usleep is in microseconds but the tcsendbreak code is
setting "sleeptime" in milliseconds.  The result is that the break
signal is way too short and is not even recognized, at least by our
board.  This problem exists in everything from b20.1 to 1.1.4.  The
following patch to winsup/fhandler_serial.cc is for the b20.1 version,
so the line numbers may be a bit off for 1.1.4.  I hope you can
incorporate this fix soon.  Thanks.

*** fhandler_serial.cc  Wed Nov 18 18:15:09 1998
--- ../../fhandler_serial.cc    Tue Feb 29 14:15:37 2000
***************
*** 167,173 ****
  int
  fhandler_serial::tcsendbreak (int duration)
  {
!   unsigned int sleeptime = 300;

    if (duration > 0)
      sleeptime *= duration;
--- 167,173 ----
  int
  fhandler_serial::tcsendbreak (int duration)
  {
!   unsigned int sleeptime = 300000;

    if (duration > 0)
      sleeptime *= duration;

-- 
Bob Wilson                      Tel: (408) 327-7312
Tensilica, Inc.                 Fax: (408) 986-8919
3255-6 Scott Blvd.              email: [email-masked]
Santa Clara, CA 95054

--
Want to unsubscribe from this list?
Send a message to [email-masked]