mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-31 23:15:44 +00:00
qom: provide root container for internal objs
We have object_get_objects_root() to keep user created objects, however no place for objects that will be used internally. Create such a container for internal objects. Backports commit 7c47c4ead75d0b733ee8f2f51fd1de0644cc1308 from qemu
This commit is contained in:
parent
61ecdd1032
commit
0741c3880a
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_aarch64
|
||||
#define object_finalize_child_property object_finalize_child_property_aarch64
|
||||
#define object_get_child_property object_get_child_property_aarch64
|
||||
#define object_get_internal_root object_get_internal_root_aarch64
|
||||
#define object_get_link_property object_get_link_property_aarch64
|
||||
#define object_get_root object_get_root_aarch64
|
||||
#define object_init_with_type object_init_with_type_aarch64
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_aarch64eb
|
||||
#define object_finalize_child_property object_finalize_child_property_aarch64eb
|
||||
#define object_get_child_property object_get_child_property_aarch64eb
|
||||
#define object_get_internal_root object_get_internal_root_aarch64eb
|
||||
#define object_get_link_property object_get_link_property_aarch64eb
|
||||
#define object_get_root object_get_root_aarch64eb
|
||||
#define object_init_with_type object_init_with_type_aarch64eb
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_arm
|
||||
#define object_finalize_child_property object_finalize_child_property_arm
|
||||
#define object_get_child_property object_get_child_property_arm
|
||||
#define object_get_internal_root object_get_internal_root_arm
|
||||
#define object_get_link_property object_get_link_property_arm
|
||||
#define object_get_root object_get_root_arm
|
||||
#define object_init_with_type object_init_with_type_arm
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_armeb
|
||||
#define object_finalize_child_property object_finalize_child_property_armeb
|
||||
#define object_get_child_property object_get_child_property_armeb
|
||||
#define object_get_internal_root object_get_internal_root_armeb
|
||||
#define object_get_link_property object_get_link_property_armeb
|
||||
#define object_get_root object_get_root_armeb
|
||||
#define object_init_with_type object_init_with_type_armeb
|
||||
|
|
|
@ -2397,6 +2397,7 @@ symbols = (
|
|||
'object_finalize',
|
||||
'object_finalize_child_property',
|
||||
'object_get_child_property',
|
||||
'object_get_internal_root',
|
||||
'object_get_link_property',
|
||||
'object_get_root',
|
||||
'object_init_with_type',
|
||||
|
|
|
@ -1053,6 +1053,17 @@ const char *object_property_get_type(struct uc_struct *uc, Object *obj,
|
|||
*/
|
||||
Object *object_get_root(struct uc_struct *uc);
|
||||
|
||||
/**
|
||||
* object_get_internal_root:
|
||||
*
|
||||
* Get the container object that holds internally used object
|
||||
* instances. Any object which is put into this container must not be
|
||||
* user visible, and it will not be exposed in the QOM tree.
|
||||
*
|
||||
* Returns: the internal object container
|
||||
*/
|
||||
Object *object_get_internal_root(struct uc_struct *uc);
|
||||
|
||||
/**
|
||||
* object_get_canonical_path_component:
|
||||
*
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_m68k
|
||||
#define object_finalize_child_property object_finalize_child_property_m68k
|
||||
#define object_get_child_property object_get_child_property_m68k
|
||||
#define object_get_internal_root object_get_internal_root_m68k
|
||||
#define object_get_link_property object_get_link_property_m68k
|
||||
#define object_get_root object_get_root_m68k
|
||||
#define object_init_with_type object_init_with_type_m68k
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_mips
|
||||
#define object_finalize_child_property object_finalize_child_property_mips
|
||||
#define object_get_child_property object_get_child_property_mips
|
||||
#define object_get_internal_root object_get_internal_root_mips
|
||||
#define object_get_link_property object_get_link_property_mips
|
||||
#define object_get_root object_get_root_mips
|
||||
#define object_init_with_type object_init_with_type_mips
|
||||
|
@ -3440,7 +3441,6 @@
|
|||
#define cpu_mips_exec cpu_mips_exec_mips
|
||||
#define cpu_mips_get_count cpu_mips_get_count_mips
|
||||
#define cpu_mips_get_random cpu_mips_get_random_mips
|
||||
#define cpu_mips_init cpu_mips_init_mips
|
||||
#define cpu_mips_kseg0_to_phys cpu_mips_kseg0_to_phys_mips
|
||||
#define cpu_mips_kvm_um_phys_to_kseg0 cpu_mips_kvm_um_phys_to_kseg0_mips
|
||||
#define cpu_mips_phys_to_kseg0 cpu_mips_phys_to_kseg0_mips
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_mips64
|
||||
#define object_finalize_child_property object_finalize_child_property_mips64
|
||||
#define object_get_child_property object_get_child_property_mips64
|
||||
#define object_get_internal_root object_get_internal_root_mips64
|
||||
#define object_get_link_property object_get_link_property_mips64
|
||||
#define object_get_root object_get_root_mips64
|
||||
#define object_init_with_type object_init_with_type_mips64
|
||||
|
@ -3440,7 +3441,6 @@
|
|||
#define cpu_mips_exec cpu_mips_exec_mips64
|
||||
#define cpu_mips_get_count cpu_mips_get_count_mips64
|
||||
#define cpu_mips_get_random cpu_mips_get_random_mips64
|
||||
#define cpu_mips_init cpu_mips_init_mips64
|
||||
#define cpu_mips_kseg0_to_phys cpu_mips_kseg0_to_phys_mips64
|
||||
#define cpu_mips_kvm_um_phys_to_kseg0 cpu_mips_kvm_um_phys_to_kseg0_mips64
|
||||
#define cpu_mips_phys_to_kseg0 cpu_mips_phys_to_kseg0_mips64
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_mips64el
|
||||
#define object_finalize_child_property object_finalize_child_property_mips64el
|
||||
#define object_get_child_property object_get_child_property_mips64el
|
||||
#define object_get_internal_root object_get_internal_root_mips64el
|
||||
#define object_get_link_property object_get_link_property_mips64el
|
||||
#define object_get_root object_get_root_mips64el
|
||||
#define object_init_with_type object_init_with_type_mips64el
|
||||
|
@ -3440,7 +3441,6 @@
|
|||
#define cpu_mips_exec cpu_mips_exec_mips64el
|
||||
#define cpu_mips_get_count cpu_mips_get_count_mips64el
|
||||
#define cpu_mips_get_random cpu_mips_get_random_mips64el
|
||||
#define cpu_mips_init cpu_mips_init_mips64el
|
||||
#define cpu_mips_kseg0_to_phys cpu_mips_kseg0_to_phys_mips64el
|
||||
#define cpu_mips_kvm_um_phys_to_kseg0 cpu_mips_kvm_um_phys_to_kseg0_mips64el
|
||||
#define cpu_mips_phys_to_kseg0 cpu_mips_phys_to_kseg0_mips64el
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_mipsel
|
||||
#define object_finalize_child_property object_finalize_child_property_mipsel
|
||||
#define object_get_child_property object_get_child_property_mipsel
|
||||
#define object_get_internal_root object_get_internal_root_mipsel
|
||||
#define object_get_link_property object_get_link_property_mipsel
|
||||
#define object_get_root object_get_root_mipsel
|
||||
#define object_init_with_type object_init_with_type_mipsel
|
||||
|
@ -3440,7 +3441,6 @@
|
|||
#define cpu_mips_exec cpu_mips_exec_mipsel
|
||||
#define cpu_mips_get_count cpu_mips_get_count_mipsel
|
||||
#define cpu_mips_get_random cpu_mips_get_random_mipsel
|
||||
#define cpu_mips_init cpu_mips_init_mipsel
|
||||
#define cpu_mips_kseg0_to_phys cpu_mips_kseg0_to_phys_mipsel
|
||||
#define cpu_mips_kvm_um_phys_to_kseg0 cpu_mips_kvm_um_phys_to_kseg0_mipsel
|
||||
#define cpu_mips_phys_to_kseg0 cpu_mips_phys_to_kseg0_mipsel
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_powerpc
|
||||
#define object_finalize_child_property object_finalize_child_property_powerpc
|
||||
#define object_get_child_property object_get_child_property_powerpc
|
||||
#define object_get_internal_root object_get_internal_root_powerpc
|
||||
#define object_get_link_property object_get_link_property_powerpc
|
||||
#define object_get_root object_get_root_powerpc
|
||||
#define object_init_with_type object_init_with_type_powerpc
|
||||
|
|
|
@ -1153,6 +1153,17 @@ Object *object_get_root(struct uc_struct *uc)
|
|||
return uc->root;
|
||||
}
|
||||
|
||||
Object *object_get_internal_root(struct uc_struct *uc)
|
||||
{
|
||||
static Object *internal_root;
|
||||
|
||||
if (!internal_root) {
|
||||
internal_root = object_new(uc, "container");
|
||||
}
|
||||
|
||||
return internal_root;
|
||||
}
|
||||
|
||||
static void object_get_child_property(struct uc_struct *uc, Object *obj, Visitor *v,
|
||||
const char *name, void *opaque, Error **errp)
|
||||
{
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_sparc
|
||||
#define object_finalize_child_property object_finalize_child_property_sparc
|
||||
#define object_get_child_property object_get_child_property_sparc
|
||||
#define object_get_internal_root object_get_internal_root_sparc
|
||||
#define object_get_link_property object_get_link_property_sparc
|
||||
#define object_get_root object_get_root_sparc
|
||||
#define object_init_with_type object_init_with_type_sparc
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_sparc64
|
||||
#define object_finalize_child_property object_finalize_child_property_sparc64
|
||||
#define object_get_child_property object_get_child_property_sparc64
|
||||
#define object_get_internal_root object_get_internal_root_sparc64
|
||||
#define object_get_link_property object_get_link_property_sparc64
|
||||
#define object_get_root object_get_root_sparc64
|
||||
#define object_init_with_type object_init_with_type_sparc64
|
||||
|
|
|
@ -2391,6 +2391,7 @@
|
|||
#define object_finalize object_finalize_x86_64
|
||||
#define object_finalize_child_property object_finalize_child_property_x86_64
|
||||
#define object_get_child_property object_get_child_property_x86_64
|
||||
#define object_get_internal_root object_get_internal_root_x86_64
|
||||
#define object_get_link_property object_get_link_property_x86_64
|
||||
#define object_get_root object_get_root_x86_64
|
||||
#define object_init_with_type object_init_with_type_x86_64
|
||||
|
|
Loading…
Reference in a new issue