1999-04-16 09:35:26 +08:00
|
|
|
/* Hardware event manager.
|
2023-01-01 20:49:04 +08:00
|
|
|
Copyright (C) 1998-2023 Free Software Foundation, Inc.
|
1999-04-16 09:35:26 +08:00
|
|
|
Contributed by Cygnus Support.
|
|
|
|
|
|
|
|
This file is part of GDB, the GNU debugger.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-24 22:30:15 +08:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
2007-08-24 22:30:15 +08:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
#ifndef HW_EVENTS_H
|
|
|
|
#define HW_EVENTS_H
|
|
|
|
|
2021-12-05 10:04:41 +08:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2021-12-05 10:09:23 +08:00
|
|
|
#include "ansidecl.h"
|
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
/* Event manager customized for hardware models.
|
|
|
|
|
|
|
|
This interface is discussed further in sim-events.h. */
|
|
|
|
|
|
|
|
struct hw_event;
|
|
|
|
typedef void (hw_event_callback) (struct hw *me, void *data);
|
|
|
|
|
|
|
|
struct hw_event *hw_event_queue_schedule
|
|
|
|
(struct hw *me,
|
2021-12-06 15:29:47 +08:00
|
|
|
int64_t delta_time,
|
1999-04-16 09:35:26 +08:00
|
|
|
hw_event_callback *handler,
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
struct hw_event *hw_event_queue_schedule_tracef
|
|
|
|
(struct hw *me,
|
2021-12-06 15:29:47 +08:00
|
|
|
int64_t delta_time,
|
1999-04-16 09:35:26 +08:00
|
|
|
hw_event_callback *handler,
|
|
|
|
void *data,
|
|
|
|
const char *fmt,
|
2021-05-03 22:54:08 +08:00
|
|
|
...) ATTRIBUTE_NULL_PRINTF (5, 6);
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
struct hw_event *hw_event_queue_schedule_vtracef
|
|
|
|
(struct hw *me,
|
2021-12-06 15:29:47 +08:00
|
|
|
int64_t delta_time,
|
1999-04-16 09:35:26 +08:00
|
|
|
hw_event_callback *handler,
|
|
|
|
void *data,
|
|
|
|
const char *fmt,
|
2021-05-03 22:54:08 +08:00
|
|
|
va_list ap) ATTRIBUTE_NULL_PRINTF (5, 0);
|
1999-04-16 09:35:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
void hw_event_queue_deschedule
|
|
|
|
(struct hw *me,
|
|
|
|
struct hw_event *event_to_remove);
|
|
|
|
|
2021-12-06 15:29:47 +08:00
|
|
|
int64_t hw_event_queue_time
|
1999-04-16 09:35:26 +08:00
|
|
|
(struct hw *me);
|
|
|
|
|
2000-07-27 19:37:34 +08:00
|
|
|
/* Returns the time that remains before the event is raised. */
|
2021-12-06 15:29:47 +08:00
|
|
|
int64_t hw_event_remain_time
|
2000-07-27 19:37:34 +08:00
|
|
|
(struct hw *me, struct hw_event *event);
|
|
|
|
|
1999-04-16 09:35:26 +08:00
|
|
|
#endif
|