From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 04/12] util: Implement qemu_get_thread_id() for OpenBSD
Date: Mon, 20 Jul 2020 13:56:13 +0100 [thread overview]
Message-ID: <20200720125621.13460-5-peter.maydell@linaro.org> (raw)
In-Reply-To: <20200720125621.13460-1-peter.maydell@linaro.org>
From: David CARLIER <devnexen@gmail.com>
Implement qemu_get_thread_id() for OpenBSD hosts, using
getthrid().
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Brad Smith <brad@comstyle.com>
Message-id: CA+XhMqxD6gQDBaj8tX0CMEj3si7qYKsM8u1km47e_-U7MC37Pg@mail.gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: tidied up commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
util/oslib-posix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 36bf8593f8c..d9236746248 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -100,6 +100,8 @@ int qemu_get_thread_id(void)
return (int)tid;
#elif defined(__NetBSD__)
return _lwp_self();
+#elif defined(__OpenBSD__)
+ return getthrid();
#else
return getpid();
#endif
--
2.20.1
next prev parent reply other threads:[~2020-07-20 12:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 12:56 [PULL 00/12] target-arm queue Peter Maydell
2020-07-20 12:56 ` [PULL 01/12] hw/arm/virt: Enable MTE via a machine property Peter Maydell
2020-07-20 12:56 ` [PULL 02/12] hw/arm/virt: Error for MTE enabled with KVM Peter Maydell
2020-07-20 12:56 ` [PULL 03/12] hw/arm/virt: Disable memory hotplug when MTE is enabled Peter Maydell
2020-07-20 12:56 ` Peter Maydell [this message]
2020-07-20 12:56 ` [PULL 05/12] qdev: Move doc comments from qdev.c to qdev-core.h Peter Maydell
2020-07-20 12:56 ` [PULL 06/12] qdev: Document qdev_unrealize() Peter Maydell
2020-07-20 12:56 ` [PULL 07/12] qdev: Document GPIO related functions Peter Maydell
2020-07-20 12:56 ` [PULL 08/12] hw/arm/armsse: Assert info->num_cpus is in-bounds in armsse_realize() Peter Maydell
2020-07-20 12:56 ` [PULL 09/12] docs/system: Briefly document canon-a1100 board Peter Maydell
2020-07-20 12:56 ` [PULL 10/12] docs/system: Briefly document collie board Peter Maydell
2020-07-20 12:56 ` [PULL 11/12] docs/system: Briefly document gumstix boards Peter Maydell
2020-07-20 12:56 ` [PULL 12/12] docs/system: Document the arm virt board Peter Maydell
2020-07-20 21:24 ` [PULL 00/12] target-arm queue Peter Maydell
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=20200720125621.13460-5-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--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).