This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for serial version of tcsendbreak


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: bwilson@tensilica.com
Santa Clara, CA 95054

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]