mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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 <avi@redhat.com>
This commit is contained in:
parent
2aeabc0817
commit
c5b703ac20
3 changed files with 17 additions and 0 deletions
1
ioport.h
1
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue