Remove gdb_usleep.c
authorTom Tromey <tom@tromey.com>
Sun, 17 Feb 2019 18:23:20 +0000 (11:23 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 26 Sep 2019 14:43:15 +0000 (08:43 -0600)
I noticed that gdb_usleep is unused, so this patch removes it.

gdb/ChangeLog
2019-09-26  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
gdb/Makefile.in
gdb/gdb_usleep.c [deleted file]
gdb/gdb_usleep.h [deleted file]
gdb/utils.c

index 433b239b58f9ce63bb30f0bcd32eeaa88f15a341..b36f196025ce0c2599ed9cd58a760e06a7e2a776 100644 (file)
@@ -1,3 +1,11 @@
+2019-09-26  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.
+
 2019-09-26  Tom Tromey  <tromey@adacore.com>
 
        * python/py-type.c (type_to_type_object): Call check_typedef
index 877a9ccd6bd727056d6288e1c277af0fea5ea3f3..d6282636752525c1b7276548ac480c2e46f15663 100644 (file)
@@ -1028,7 +1028,6 @@ COMMON_SFILES = \
        gdb_bfd.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 (file)
index 9a92ced..0000000
+++ /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 "gdb_select.h"
-#include "gdbsupport/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 (file)
index aadbf0d..0000000
+++ /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) */
-
index 11295ed97895cdb142423109ea56c33a37154344..b7d380073ff52ee9dcbea3c6e9c131a870ec6182 100644 (file)
@@ -62,7 +62,6 @@
 
 #include <chrono>
 
-#include "gdb_usleep.h"
 #include "interps.h"
 #include "gdb_regex.h"
 #include "gdbsupport/job-control.h"
This page took 0.031614 seconds and 4 git commands to generate.