diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-24 12:38:24 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-09 18:20:27 +0200 |
commit | e95b135f88f6e3a29387cd4aabb410b8f966fc81 (patch) | |
tree | d5333404cf59b298bbca635f2e3c2b89c57635c1 | |
parent | 964711c44c9a45bbda0553a456e581fa9c1a3749 (diff) | |
download | qemu-e95b135f88f6e3a29387cd4aabb410b8f966fc81.zip qemu-e95b135f88f6e3a29387cd4aabb410b8f966fc81.tar.gz qemu-e95b135f88f6e3a29387cd4aabb410b8f966fc81.tar.bz2 |
modules: add module_obj() note to QOM docs
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <20210624103836.2382472-23-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | docs/devel/qom.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 42d0dc4..e5fe359 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -87,6 +87,14 @@ specific type: #define MY_DEVICE(obj) \ OBJECT_CHECK(MyDevice, obj, TYPE_MY_DEVICE) +In case the ObjectClass implementation can be built as module a +module_obj() line must be added to make sure qemu loads the module +when the object is needed. + +.. code-block:: c + + module_obj(TYPE_MY_DEVICE); + Class Initialization ==================== |