mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qdev: add helpers to be more explicit when using abstract QOM parent functions
QOM API learning curve is quite hard, in particular when devices inherit from abstract parent. To be more explicit about when a device class change the parent hooks, add few helpers hoping a device class_init() will be easier to understand. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180114020412.26160-3-f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b850f664a1
commit
46795cf2e2
2 changed files with 34 additions and 0 deletions
|
@ -382,6 +382,16 @@ void qdev_machine_init(void);
|
|||
*/
|
||||
void device_reset(DeviceState *dev);
|
||||
|
||||
void device_class_set_parent_reset(DeviceClass *dc,
|
||||
DeviceReset dev_reset,
|
||||
DeviceReset *parent_reset);
|
||||
void device_class_set_parent_realize(DeviceClass *dc,
|
||||
DeviceRealize dev_realize,
|
||||
DeviceRealize *parent_realize);
|
||||
void device_class_set_parent_unrealize(DeviceClass *dc,
|
||||
DeviceUnrealize dev_unrealize,
|
||||
DeviceUnrealize *parent_unrealize);
|
||||
|
||||
const struct VMStateDescription *qdev_get_vmsd(DeviceState *dev);
|
||||
|
||||
const char *qdev_fw_name(DeviceState *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue