From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PATCH 2/4] modules: add module_obj() note to QOM docs
Date: Tue, 22 Jun 2021 14:51:08 +0200 [thread overview]
Message-ID: <20210622125110.262843-3-kraxel@redhat.com> (raw)
In-Reply-To: <20210622125110.262843-1-kraxel@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 42d0dc4f4da8..e5fe3597cd82 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
====================
--
2.31.1
next prev parent reply other threads:[~2021-06-22 12:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 12:51 [PATCH 0/4] modules: update developer documentation Gerd Hoffmann
2021-06-22 12:51 ` [PATCH 1/4] modules: add documentation for module sourcesets Gerd Hoffmann
2021-06-22 12:51 ` Gerd Hoffmann [this message]
2021-06-22 12:51 ` [PATCH 3/4] modules: module.h kerneldoc annotations Gerd Hoffmann
2021-06-22 17:09 ` Jose R. Ziviani
2021-06-22 12:51 ` [PATCH 4/4] modules: hook up modules.h to docs build Gerd Hoffmann
2021-06-22 16:05 ` [PATCH 0/4] modules: update developer documentation Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210622125110.262843-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).