aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-24 15:19:46 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-09-24 15:19:46 -0400
commit29363cfa40b59aca282a0b3b2ba4c305f6ff8f79 (patch)
tree90148888d5a98d2434303549f84e719ae6cfbce7
parentb551a89f51504735e9979ac885a5784e21cfecef (diff)
downloadgdb-29363cfa40b59aca282a0b3b2ba4c305f6ff8f79.zip
gdb-29363cfa40b59aca282a0b3b2ba4c305f6ff8f79.tar.gz
gdb-29363cfa40b59aca282a0b3b2ba4c305f6ff8f79.tar.bz2
gdb: remove file_handler typedef
Remove the typedef (unneeded with C++). Re-format the comments to follow the more common style. gdbsupport/ChangeLog: * event-loop.c (struct file_handler): Remove typedef, re-format. Change-Id: I3aea21fba1eb2584c507de3412da4e4c98283b2d
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/event-loop.cc35
2 files changed, 27 insertions, 12 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index d46f8c7..a2f563c 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,7 @@
+2020-09-24 Simon Marchi <simon.marchi@efficios.com>
+
+ * event-loop.c (struct file_handler): Remove typedef, re-format.
+
2020-09-16 John Baldwin <jhb@FreeBSD.org>
* common.m4 (GDB_AC_COMMON): Refactor checks for kinfo_getfile().
diff --git a/gdbsupport/event-loop.cc b/gdbsupport/event-loop.cc
index e959e1b..59436d4 100644
--- a/gdbsupport/event-loop.cc
+++ b/gdbsupport/event-loop.cc
@@ -44,18 +44,29 @@
/* Information about each file descriptor we register with the event
loop. */
-typedef struct file_handler
- {
- int fd; /* File descriptor. */
- int mask; /* Events we want to monitor: POLLIN, etc. */
- int ready_mask; /* Events that have been seen since
- the last time. */
- handler_func *proc; /* Procedure to call when fd is ready. */
- gdb_client_data client_data; /* Argument to pass to proc. */
- int error; /* Was an error detected on this fd? */
- struct file_handler *next_file; /* Next registered file descriptor. */
- }
-file_handler;
+struct file_handler
+{
+ /* File descriptor. */
+ int fd;
+
+ /* Events we want to monitor: POLLIN, etc. */
+ int mask;
+
+ /* Events that have been seen since the last time. */
+ int ready_mask;
+
+ /* Procedure to call when fd is ready. */
+ handler_func *proc;
+
+ /* Argument to pass to proc. */
+ gdb_client_data client_data;
+
+ /* Was an error detected on this fd? */
+ int error;
+
+ /* Next registered file descriptor. */
+ struct file_handler *next_file;
+};
/* Do we use poll or select ? */
#ifdef HAVE_POLL