From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFC 05/17] Remove gdb_usleep.c
Date: Sun, 24 Feb 2019 16:52:00 -0000 [thread overview]
Message-ID: <20190224165153.5062-6-tom@tromey.com> (raw)
In-Reply-To: <20190224165153.5062-1-tom@tromey.com>
I noticed that gdb_usleep is unused, so this patch removes it.
gdb/ChangeLog
2019-02-24 Tom Tromey <tom@tromey.com>
* Makefile.in (COMMON_SFILES): Remove gdb_usleep.c.
(HFILES_NO_SRCDIR): Remove gdb_usleep.h.
* gdb_usleep.h: Remove.
* gdb_usleep.c: Remove.
* utils.c: Don't include gdb_usleep.h.
---
gdb/ChangeLog | 8 ++++++++
gdb/Makefile.in | 2 --
gdb/gdb_usleep.c | 39 ---------------------------------------
gdb/gdb_usleep.h | 30 ------------------------------
gdb/utils.c | 1 -
5 files changed, 8 insertions(+), 72 deletions(-)
delete mode 100644 gdb/gdb_usleep.c
delete mode 100644 gdb/gdb_usleep.h
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 5614cc3386c..61b0b9d01bd 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1031,7 +1031,6 @@ COMMON_SFILES = \
gdb-dlfcn.c \
gdb_obstack.c \
gdb_regex.c \
- gdb_usleep.c \
gdbarch.c \
gdbarch-selftests.c \
gdbtypes.c \
@@ -1265,7 +1264,6 @@ HFILES_NO_SRCDIR = \
gdb_regex.h \
gdb_select.h \
gdb-stabs.h \
- gdb_usleep.h \
gdb_vfork.h \
gdb_wchar.h \
gdbarch.h \
diff --git a/gdb/gdb_usleep.c b/gdb/gdb_usleep.c
deleted file mode 100644
index 0dcba0e6fad..00000000000
--- a/gdb/gdb_usleep.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include "defs.h"
-#include "gdb_usleep.h"
-#include "common/gdb_select.h"
-#include "common/gdb_sys_time.h"
-
-int
-gdb_usleep (int usec)
-{
- struct timeval delay;
- int retval;
-
- delay.tv_sec = usec / 1000000;
- delay.tv_usec = usec % 1000000;
- retval = gdb_select (0, 0, 0, 0, &delay);
-
- if (retval < 0)
- retval = -1;
- else
- retval = 0;
-
- return retval;
-}
diff --git a/gdb/gdb_usleep.h b/gdb/gdb_usleep.h
deleted file mode 100644
index aadbf0d0ad6..00000000000
--- a/gdb/gdb_usleep.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2009-2019 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined(GDB_USLEEP_H)
-#define GDB_USLEEP_H
-
-/* Suspend execution for USEC microseconds.
-
- Limitation: If a signal is raised during the delay, gdb_usleep
- might return earlier than requested.
-
- It returns 0 on success or -1 on error. */
-extern int gdb_usleep (int usect);
-
-#endif /* !defined(GDB_USLEEP_H) */
-
diff --git a/gdb/utils.c b/gdb/utils.c
index ec2619642a1..e7fde4942ec 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -62,7 +62,6 @@
#include <chrono>
-#include "gdb_usleep.h"
#include "interps.h"
#include "gdb_regex.h"
#include "common/job-control.h"
--
2.17.2
next prev parent reply other threads:[~2019-02-24 16:52 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-24 16:51 [RFC 00/17] Merge event loop implementations Tom Tromey
2019-02-24 16:52 ` [RFC 15/17] Move gdb_notifier comment Tom Tromey
2019-09-26 14:06 ` Pedro Alves
2019-02-24 16:52 ` [RFC 03/17] Move event-loop configury to common.m4 Tom Tromey
2019-02-24 16:52 ` [RFC 02/17] Move gdb-specific code out of start_event_loop Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` [RFC 08/17] Introduce and use flush_streams Tom Tromey
2019-02-24 16:52 ` [RFC 07/17] Use warning in event-loop Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` [RFC 01/17] Remove include from event-loop.c Tom Tromey
2019-02-24 16:52 ` [RFC 16/17] Remove gdb_fildes_t Tom Tromey
2019-02-24 16:52 ` [RFC 11/17] Implement event-loop glue for gdbserver Tom Tromey
2019-02-24 16:52 ` [RFC 12/17] Add the ability to stop the event loop Tom Tromey
2019-02-24 16:52 ` [RFC 09/17] Introduce async-event.[ch] Tom Tromey
2019-09-26 14:06 ` Pedro Alves
2019-10-04 22:17 ` Tom Tromey
2019-02-24 16:52 ` [RFC 06/17] Include <chrono> in event-loop.c Tom Tromey
2019-09-26 14:02 ` Pedro Alves
2019-02-24 16:52 ` [RFC 04/17] Move gdb_select.h to common/ Tom Tromey
2019-02-24 16:52 ` Tom Tromey [this message]
2019-09-26 14:02 ` [RFC 05/17] Remove gdb_usleep.c Pedro Alves
2019-09-26 14:43 ` Tom Tromey
2019-02-24 16:52 ` [RFC 10/17] Move event-loop.[ch] to common/ Tom Tromey
2019-09-26 14:06 ` Pedro Alves
2019-10-04 22:06 ` Tom Tromey
2019-02-24 16:52 ` [RFC 13/17] Switch gdbserver to common event loop Tom Tromey
2019-02-24 16:52 ` [RFC 17/17] Simplify gdbserver's serial event handling Tom Tromey
2019-09-26 17:36 ` Pedro Alves
2019-10-04 22:08 ` Tom Tromey
2019-02-24 16:52 ` [RFC 14/17] Remove some dead code from event-loop.c Tom Tromey
2019-02-24 17:14 ` [RFC 00/17] Merge event loop implementations Eli Zaretskii
2019-02-24 17:26 ` Tom Tromey
2019-02-24 17:45 ` Eli Zaretskii
2019-02-25 19:57 ` Tom Tromey
2019-02-25 20:30 ` Eli Zaretskii
2019-02-25 20:55 ` Tom Tromey
2019-02-26 16:04 ` Eli Zaretskii
2019-02-26 16:23 ` Tom Tromey
2019-02-26 16:46 ` Eli Zaretskii
2019-09-26 17:47 ` Pedro Alves
2019-09-26 23:09 ` Tom Tromey
2019-09-27 13:53 ` Pedro Alves
2019-09-27 14:05 ` Pedro Alves
2019-09-27 14:21 ` Eli Zaretskii
2019-09-27 14:53 ` Pedro Alves
2019-09-27 15:32 ` Eli Zaretskii
2019-09-27 19:10 ` Tom Tromey
2020-02-14 2:22 ` Tom Tromey
2020-02-14 17:58 ` Pedro Alves
2020-02-14 18:36 ` Tom Tromey
2019-10-04 22:25 ` Tom Tromey
2020-02-14 18:20 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190224165153.5062-6-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox