qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"John G Johnson" <john.g.johnson@oracle.com>,
	"Jagannathan Raman" <jag.raman@oracle.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 6/7] stubs: Split machine-init-done as machine-init and machine-notify
Date: Thu, 23 Apr 2020 22:21:11 +0200	[thread overview]
Message-ID: <20200423202112.644-7-philmd@redhat.com> (raw)
In-Reply-To: <20200423202112.644-1-philmd@redhat.com>

As the machine notify handlers are only used in system emulation,
split the current file in two, and only build the notifier when
system emulation is used.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 stubs/machine-init.c                            | 4 ++++
 stubs/{machine-init-done.c => machine-notify.c} | 2 --
 stubs/Makefile.objs                             | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 stubs/machine-init.c
 rename stubs/{machine-init-done.c => machine-notify.c} (78%)

diff --git a/stubs/machine-init.c b/stubs/machine-init.c
new file mode 100644
index 0000000000..7622930ee0
--- /dev/null
+++ b/stubs/machine-init.c
@@ -0,0 +1,4 @@
+#include "qemu/osdep.h"
+#include "sysemu/sysemu.h"
+
+bool machine_init_done = true;
diff --git a/stubs/machine-init-done.c b/stubs/machine-notify.c
similarity index 78%
rename from stubs/machine-init-done.c
rename to stubs/machine-notify.c
index cd8e81392d..d164ecccb9 100644
--- a/stubs/machine-init-done.c
+++ b/stubs/machine-notify.c
@@ -1,8 +1,6 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 
-bool machine_init_done = true;
-
 void qemu_add_machine_init_done_notifier(Notifier *notify)
 {
 }
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 45be5dc0ed..765659a3f9 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -15,7 +15,8 @@ stub-obj-y += iothread-lock.o
 stub-obj-y += is-daemonized.o
 stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
 stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o
-stub-obj-y += machine-init-done.o
+stub-obj-y += machine-init.o
+stub-obj-$(CONFIG_SOFTMMU) += machine-notify.o
 stub-obj-y += migr-blocker.o
 stub-obj-y += change-state-handler.o
 stub-obj-y += monitor.o
-- 
2.21.1



  parent reply	other threads:[~2020-04-23 20:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 20:21 [PATCH 0/7] chardev: Reduce system emulation specific code Philippe Mathieu-Daudé
2020-04-23 20:21 ` [PATCH 1/7] monitor/misc: Remove unused "chardev/char-mux.h" include Philippe Mathieu-Daudé
2020-04-23 20:42   ` Marc-André Lureau
2020-04-23 20:21 ` [PATCH 2/7] tests/test-char: " Philippe Mathieu-Daudé
2020-04-23 20:51   ` Marc-André Lureau
2020-04-23 20:21 ` [PATCH 3/7] chardev: Restrict msmouse / wctablet / testdev to system emulation Philippe Mathieu-Daudé
2020-04-23 20:51   ` Marc-André Lureau
2020-04-23 20:21 ` [PATCH 4/7] chardev: Reduce "char-mux.h" scope, rename it "chardev-internal.h" Philippe Mathieu-Daudé
2020-04-23 21:34   ` Marc-André Lureau
2020-04-23 20:21 ` [PATCH 5/7] chardev: Extract system emulation specific code Philippe Mathieu-Daudé
2020-04-23 21:34   ` Marc-André Lureau
2020-04-24 13:19   ` Jag Raman
2020-04-23 20:21 ` Philippe Mathieu-Daudé [this message]
2020-04-23 20:43   ` [PATCH 6/7] stubs: Split machine-init-done as machine-init and machine-notify Marc-André Lureau
2020-04-23 20:21 ` [PATCH 7/7] multi-process: Refactor machine_init and exit notifiers Philippe Mathieu-Daudé
2020-04-24  3:49 ` [PATCH 0/7] chardev: Reduce system emulation specific code Richard Henderson

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=20200423202112.644-7-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=jag.raman@oracle.com \
    --cc=john.g.johnson@oracle.com \
    --cc=marcandre.lureau@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).