[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 26/48] modules: add module_obj() note to QOM docs

From: Paolo Bonzini
Subject: [PULL 26/48] modules: add module_obj() note to QOM docs
Date: Thu, 8 Jul 2021 17:17:26 +0200

From: Gerd Hoffmann <kraxel@redhat.com>

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>
 docs/devel/qom.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst
index 42d0dc4f4d..e5fe3597cd 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]