mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
gdb: small cleanup of async-event.c structs
This is a small cleanup to normalize the structures in async-event.c with the rest of the code base: - Remove the unnecessary typedefs - Fix indentation of struct bodies - Put comments above fields No functional changes expected. gdb/ChangeLog: * async-event.c (struct async_signal_handler, struct async_event_handler): Reformat, remove typedef.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-05-07 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
|
* async-event.c (struct async_signal_handler, struct
|
||||||
|
async_event_handler): Reformat, remove typedef.
|
||||||
|
|
||||||
2020-05-07 Simon Marchi <simon.marchi@efficios.com>
|
2020-05-07 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
* gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
|
* gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
|
||||||
|
@ -32,16 +32,21 @@
|
|||||||
Async_init_signals takes care of setting up such an
|
Async_init_signals takes care of setting up such an
|
||||||
async_signal_handler for each interesting signal. */
|
async_signal_handler for each interesting signal. */
|
||||||
|
|
||||||
typedef struct async_signal_handler
|
struct async_signal_handler
|
||||||
{
|
{
|
||||||
int ready; /* If ready, call this handler
|
/* If ready, call this handler from the main event loop, using
|
||||||
from the main event loop, using
|
invoke_async_handler. */
|
||||||
invoke_async_handler. */
|
int ready;
|
||||||
struct async_signal_handler *next_handler; /* Ptr to next handler. */
|
|
||||||
sig_handler_func *proc; /* Function to call to do the work. */
|
/* Pointer to next handler. */
|
||||||
gdb_client_data client_data; /* Argument to async_handler_func. */
|
struct async_signal_handler *next_handler;
|
||||||
}
|
|
||||||
async_signal_handler;
|
/* Function to call to do the work. */
|
||||||
|
sig_handler_func *proc;
|
||||||
|
|
||||||
|
/* Argument to PROC. */
|
||||||
|
gdb_client_data client_data;
|
||||||
|
};
|
||||||
|
|
||||||
/* PROC is a function to be invoked when the READY flag is set. This
|
/* PROC is a function to be invoked when the READY flag is set. This
|
||||||
happens when the event has been marked with
|
happens when the event has been marked with
|
||||||
@ -49,45 +54,44 @@ async_signal_handler;
|
|||||||
to an event will be carried out by PROC at a later time, within
|
to an event will be carried out by PROC at a later time, within
|
||||||
process_event. This provides a deferred execution of event
|
process_event. This provides a deferred execution of event
|
||||||
handlers. */
|
handlers. */
|
||||||
typedef struct async_event_handler
|
struct async_event_handler
|
||||||
{
|
{
|
||||||
/* If ready, call this handler from the main event loop, using
|
/* If ready, call this handler from the main event loop, using
|
||||||
invoke_event_handler. */
|
invoke_event_handler. */
|
||||||
int ready;
|
int ready;
|
||||||
|
|
||||||
/* Point to next handler. */
|
/* Pointer to next handler. */
|
||||||
struct async_event_handler *next_handler;
|
struct async_event_handler *next_handler;
|
||||||
|
|
||||||
/* Function to call to do the work. */
|
/* Function to call to do the work. */
|
||||||
async_event_handler_func *proc;
|
async_event_handler_func *proc;
|
||||||
|
|
||||||
/* Argument to PROC. */
|
/* Argument to PROC. */
|
||||||
gdb_client_data client_data;
|
gdb_client_data client_data;
|
||||||
}
|
};
|
||||||
async_event_handler;
|
|
||||||
|
|
||||||
/* All the async_signal_handlers gdb is interested in are kept onto
|
/* All the async_signal_handlers gdb is interested in are kept onto
|
||||||
this list. */
|
this list. */
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
/* Pointer to first in handler list. */
|
/* Pointer to first in handler list. */
|
||||||
async_signal_handler *first_handler;
|
async_signal_handler *first_handler;
|
||||||
|
|
||||||
/* Pointer to last in handler list. */
|
/* Pointer to last in handler list. */
|
||||||
async_signal_handler *last_handler;
|
async_signal_handler *last_handler;
|
||||||
}
|
}
|
||||||
sighandler_list;
|
sighandler_list;
|
||||||
|
|
||||||
/* All the async_event_handlers gdb is interested in are kept onto
|
/* All the async_event_handlers gdb is interested in are kept onto
|
||||||
this list. */
|
this list. */
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
/* Pointer to first in handler list. */
|
/* Pointer to first in handler list. */
|
||||||
async_event_handler *first_handler;
|
async_event_handler *first_handler;
|
||||||
|
|
||||||
/* Pointer to last in handler list. */
|
/* Pointer to last in handler list. */
|
||||||
async_event_handler *last_handler;
|
async_event_handler *last_handler;
|
||||||
}
|
}
|
||||||
async_event_handler_list;
|
async_event_handler_list;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user