X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fhw-events.c;h=301f868ce2ee2049d188cb37d99d0a541d0583b5;hb=20a8e078cc573f85f7262f7b87be3cf8e8a6424f;hp=fc73be8f60eb105fd4ccff9bc1ed5735818454d7;hpb=dc3cf14f35b666eed7be13100ff58639450aa5cf;p=binutils-gdb.git
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index fc73be8f60e..301f868ce2e 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -1,5 +1,5 @@
/* Hardware event manager.
- Copyright (C) 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -17,16 +17,20 @@ 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 . */
+/* This must come before any other includes. */
+#include "defs.h"
+
+#include
#include "hw-main.h"
#include "hw-base.h"
#include "sim-events.h"
-
/* The hw-events object is implemented using sim-events */
-struct hw_event {
+struct hw_event
+{
void *data;
struct hw *me;
hw_event_callback *callback;
@@ -34,7 +38,8 @@ struct hw_event {
struct hw_event_data *entry;
};
-struct hw_event_data {
+struct hw_event_data
+{
struct hw_event event;
struct hw_event_data *next;
};
@@ -85,12 +90,7 @@ hw_event_queue_schedule (struct hw *me,
hw_event_callback *callback,
void *data)
{
- struct hw_event *event;
- va_list dummy;
- memset (&dummy, 0, sizeof dummy);
- event = hw_event_queue_schedule_vtracef (me, delta_time, callback, data,
- NULL, dummy);
- return event;
+ return hw_event_queue_schedule_tracef (me, delta_time, callback, data, NULL);
}
struct hw_event *
@@ -179,9 +179,11 @@ hw_event_remain_time (struct hw *me, struct hw_event *event)
Build with `make test-hw-events' in sim/ directory*/
#if defined (MAIN)
-#include "sim-main.h"
-#include
#include
+#include
+#include
+
+#include "sim-main.h"
static void
test_handler (struct hw *me,