[RFC,15/17] Move gdb_notifier comment

Message ID 20190224165153.5062-16-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey Feb. 24, 2019, 4:51 p.m. UTC
  This moves the gdb_notifier comment a bit lower in event-loop.c, to
where it belongs.

gdb/ChangeLog
2019-02-24  Tom Tromey  <tom@tromey.com>

	* common/event-loop.c: Move comment.
---
 gdb/ChangeLog           |  4 ++++
 gdb/common/event-loop.c | 22 +++++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)
  

Comments

Pedro Alves Sept. 26, 2019, 2:06 p.m. UTC | #1
On 2/24/19 4:51 PM, Tom Tromey wrote:
> This moves the gdb_notifier comment a bit lower in event-loop.c, to
> where it belongs.
> 
> gdb/ChangeLog
> 2019-02-24  Tom Tromey  <tom@tromey.com>
> 
> 	* common/event-loop.c: Move comment.
> ---
>  gdb/ChangeLog           |  4 ++++
>  gdb/common/event-loop.c | 22 +++++++++++-----------
>  2 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/gdb/common/event-loop.c b/gdb/common/event-loop.c
> index 62de430f067..e761ebf27f6 100644
> --- a/gdb/common/event-loop.c
> +++ b/gdb/common/event-loop.c
> @@ -57,17 +57,6 @@ typedef struct file_handler
>    }
>  file_handler;
>  
> -/* Gdb_notifier is just a list of file descriptors gdb is interested in.
> -   These are the input file descriptor, and the target file
> -   descriptor.  We have two flavors of the notifier, one for platforms
> -   that have the POLL function, the other for those that don't, and
> -   only support SELECT.  Each of the elements in the gdb_notifier list is
> -   basically a description of what kind of events gdb is interested
> -   in, for each fd.  */
> -
> -/* As of 1999-04-30 only the input file descriptor is registered with the
> -   event loop.  */
> -
>  /* Do we use poll or select ? */
>  #ifdef HAVE_POLL
>  #define USE_POLL 1
> @@ -82,6 +71,17 @@ static unsigned char use_poll = USE_POLL;
>  #include <io.h>
>  #endif
>  
> +/* Gdb_notifier is just a list of file descriptors gdb is interested in.
> +   These are the input file descriptor, and the target file
> +   descriptor.  We have two flavors of the notifier, one for platforms
> +   that have the POLL function, the other for those that don't, and
> +   only support SELECT.  Each of the elements in the gdb_notifier list is
> +   basically a description of what kind of events gdb is interested
> +   in, for each fd.  */
> +
> +/* As of 1999-04-30 only the input file descriptor is registered with the
> +   event loop.  */

Might as well remove this stale "as of 1999-04-30" remark.  We
certainly register more file descriptors in the event loop nowadays.

> +
>  static struct
>    {
>      /* Ptr to head of file handler list.  */
>
  

Patch

diff --git a/gdb/common/event-loop.c b/gdb/common/event-loop.c
index 62de430f067..e761ebf27f6 100644
--- a/gdb/common/event-loop.c
+++ b/gdb/common/event-loop.c
@@ -57,17 +57,6 @@  typedef struct file_handler
   }
 file_handler;
 
-/* Gdb_notifier is just a list of file descriptors gdb is interested in.
-   These are the input file descriptor, and the target file
-   descriptor.  We have two flavors of the notifier, one for platforms
-   that have the POLL function, the other for those that don't, and
-   only support SELECT.  Each of the elements in the gdb_notifier list is
-   basically a description of what kind of events gdb is interested
-   in, for each fd.  */
-
-/* As of 1999-04-30 only the input file descriptor is registered with the
-   event loop.  */
-
 /* Do we use poll or select ? */
 #ifdef HAVE_POLL
 #define USE_POLL 1
@@ -82,6 +71,17 @@  static unsigned char use_poll = USE_POLL;
 #include <io.h>
 #endif
 
+/* Gdb_notifier is just a list of file descriptors gdb is interested in.
+   These are the input file descriptor, and the target file
+   descriptor.  We have two flavors of the notifier, one for platforms
+   that have the POLL function, the other for those that don't, and
+   only support SELECT.  Each of the elements in the gdb_notifier list is
+   basically a description of what kind of events gdb is interested
+   in, for each fd.  */
+
+/* As of 1999-04-30 only the input file descriptor is registered with the
+   event loop.  */
+
 static struct
   {
     /* Ptr to head of file handler list.  */