From 4e73b9c108addafbb3f7499b4e529854d496d5e4 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Mon, 27 Nov 2000 19:53:35 +0000 Subject: [PATCH] Fix delete_hw_event_data() to free the scheduled events --- sim/common/ChangeLog | 4 ++++ sim/common/hw-events.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index ec478ab924e..362d951599e 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2000-11-26 Stephane Carrez + + * hw-events.c (delete_hw_event_data): Remove the scheduled events. + 2000-11-26 Stephane Carrez * dv-core.c (dv_core_attach_address_callback): Don't abort if diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c index f60dfa32e6a..243a7aae712 100644 --- a/sim/common/hw-events.c +++ b/sim/common/hw-events.c @@ -51,8 +51,9 @@ create_hw_event_data (struct hw *me) void delete_hw_event_data (struct hw *me) { - if (me->events_of_hw != NULL) - hw_abort (me, "stray events"); + /* Remove the scheduled event. */ + while (me->events_of_hw) + hw_event_queue_deschedule (me, &me->events_of_hw->event); } -- 2.30.2