This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
patch for serial version of tcsendbreak
- To: cygwin at sourceware dot cygnus dot com
- Subject: patch for serial version of tcsendbreak
- From: Bob Wilson <bwilson at tensilica dot com>
- Date: Tue, 08 Aug 2000 11:40:20 -0700
- Organization: Tensilica, Inc.
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