/* 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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* This must come before any other includes. */
+#include "defs.h"
+
+#include <string.h>
#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;
struct hw_event_data *entry;
};
-struct hw_event_data {
+struct hw_event_data
+{
struct hw_event event;
struct hw_event_data *next;
};
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 *
Build with `make test-hw-events' in sim/<cpu> directory*/
#if defined (MAIN)
-#include "sim-main.h"
-#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "sim-main.h"
static void
test_handler (struct hw *me,