aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-03-24 01:37:48 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-03-24 01:37:48 +0000
commitdcb626be9b9ad95a4a7f545779664bd09ae4889d (patch)
treebbd44a9f396b85adf14da08e64af82371bb6e3b7 /gdb/ser-unix.c
parent24be086dc45e40b381af7b5c565002f47161305a (diff)
downloadfsf-binutils-gdb-dcb626be9b9ad95a4a7f545779664bd09ae4889d.zip
fsf-binutils-gdb-dcb626be9b9ad95a4a7f545779664bd09ae4889d.tar.gz
fsf-binutils-gdb-dcb626be9b9ad95a4a7f545779664bd09ae4889d.tar.bz2
* gdb_usleep.h, gdb_usleep.c: New files.
* Makefile.in (SFILES): Add gdb_usleep.c. (HFILES_NO_SRCDIR): Add gdb_usleep.h. (COMMON_OBS): Add gdb_usleep.o. * ser-unix.c (hardwire_send_break): Replace call to gdb_select by call to gdb_usleep.
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r--gdb/ser-unix.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 07abf2b..ea2938d 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -368,16 +368,13 @@ hardwire_send_break (struct serial *scb)
#ifdef HAVE_SGTTY
{
int status;
- struct timeval timeout;
status = ioctl (scb->fd, TIOCSBRK, 0);
/* Can't use usleep; it doesn't exist in BSD 4.2. */
- /* Note that if this select() is interrupted by a signal it will not wait
- the full length of time. I think that is OK. */
- timeout.tv_sec = 0;
- timeout.tv_usec = 250000;
- gdb_select (0, 0, 0, 0, &timeout);
+ /* Note that if this gdb_select() is interrupted by a signal it will not
+ wait the full length of time. I think that is OK. */
+ gdb_usleep (250000);
status = ioctl (scb->fd, TIOCCBRK, 0);
return status;
}