From c5b703ac2073de8b968ef058793db0294f6a2979 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 5 Mar 2012 17:36:19 +0200 Subject: ioport: add destructor method to IORange Previously all callers had a containing object with a destructor that could be used to trigger cleanup of the IORange objects (typically just freeing the containing object), but a forthcoming memory API change doesn't fit this pattern. Rather than setting up a new global table, extend the ioport system to support destructors. Signed-off-by: Avi Kivity --- ioport.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ioport.h') diff --git a/ioport.h b/ioport.h index ab29c89fb3..23441cba08 100644 --- a/ioport.h +++ b/ioport.h @@ -36,6 +36,7 @@ typedef uint32_t pio_addr_t; /* These should really be in isa.h, but are here to make pc.h happy. */ typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); +typedef void (IOPortDestructor)(void *opaque); void ioport_register(IORange *iorange); int register_ioport_read(pio_addr_t start, int length, int size, -- cgit v1.2.3-55-g7522