aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-hw.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-05-25 07:37:30 +0000
committerAndrew Cagney <cagney@redhat.com>1998-05-25 07:37:30 +0000
commit39e953a72287cfa9335871478f27258989a22a66 (patch)
tree6438a7bde0347193bf8971ff7f1024e27b85690d /sim/common/sim-hw.c
parent2f06c437e28ea3bfab27cc9b9b11dd235397a938 (diff)
downloadfsf-binutils-gdb-39e953a72287cfa9335871478f27258989a22a66.zip
fsf-binutils-gdb-39e953a72287cfa9335871478f27258989a22a66.tar.gz
fsf-binutils-gdb-39e953a72287cfa9335871478f27258989a22a66.tar.bz2
Split out hw-event code. Clean up interface. Update all users.
Diffstat (limited to 'sim/common/sim-hw.c')
-rw-r--r--sim/common/sim-hw.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index 51b7b0f..fa3ca8f 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -503,62 +503,3 @@ do_hw_poll_read (struct hw *me,
#endif
}
}
-
-
-/* The event queue abstraction (for devices) */
-
-
-struct _hw_event {
- void *data;
- struct hw *me;
- hw_event_handler *handler;
- sim_event *real;
-};
-
-/* Pass the H/W event onto the real handler */
-
-static void
-bounce_hw_event (SIM_DESC sd,
- void *data)
-{
- hw_event event = * (hw_event*) data;
- zfree (data);
- /* if we are delivering an event, we don't have a CPU. */
- STATE_HW (sd)->cpu = NULL;
- event.handler (event.me, event.data);
-}
-
-
-/* Map onto the event functions */
-
-hw_event *
-hw_event_queue_schedule (struct hw *me,
- signed64 delta_time,
- hw_event_handler *handler,
- void *data)
-{
- hw_event *event = ZALLOC (hw_event);
- event->data = data;
- event->handler = handler;
- event->me = me;
- event->real = sim_events_schedule (hw_system (me),
- delta_time,
- bounce_hw_event,
- event);
- return event;
-}
-
-void
-hw_event_queue_deschedule (struct hw *me,
- hw_event *event_to_remove)
-{
- sim_events_deschedule (hw_system (me),
- event_to_remove->real);
- zfree (event_to_remove);
-}
-
-signed64
-hw_event_queue_time (struct hw *me)
-{
- return sim_events_time (hw_system (me));
-}