summaryrefslogtreecommitdiffstats
path: root/util/qemu-thread-posix.c
diff options
context:
space:
mode:
authorRichard Henderson2021-10-14 19:49:38 +0200
committerRichard Henderson2021-10-14 19:49:38 +0200
commit4d1a525dfafe995a98bb486e702da09e31b68b9c (patch)
treea799bf5d234cc2059f91287f527e7a52d1352f5c /util/qemu-thread-posix.c
parentMerge remote-tracking branch 'remotes/rth/tags/pull-tcg-20211013' into staging (diff)
parentconfigure: automatically parse command line for meson -D options (diff)
downloadqemu-4d1a525dfafe995a98bb486e702da09e31b68b9c.tar.gz
qemu-4d1a525dfafe995a98bb486e702da09e31b68b9c.tar.xz
qemu-4d1a525dfafe995a98bb486e702da09e31b68b9c.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Meson conversions + introspection-based command line parser # gpg: Signature made Thu 14 Oct 2021 12:51:54 AM PDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] * remotes/bonzini/tags/for-upstream: (26 commits) configure: automatically parse command line for meson -D options meson-buildoptions: include list of tracing backends configure: prepare for auto-generated option parsing configure: accept "internal" for --enable-capstone/slirp/fdt configure: remove deprecated --{enable, disable}-git-update configure, meson: move more compiler checks to Meson configure: remove obsolete Solaris ar check configure, meson: move Spice configure handling to meson configure, meson: move netmap detection to meson configure, meson: move vde detection to meson configure, meson: move libaio check to meson.build configure, meson: move pthread_setname_np checks to Meson configure, meson: move remaining HAVE_* compiler tests to Meson meson: HAVE_GDB_BIN is not used by C code configure, meson: remove CONFIG_GCOV from config-host.mak configure, meson: get HOST_WORDS_BIGENDIAN via the machine object configure, meson: move CONFIG_HOST_DSOSUF to Meson trace: move configuration from configure to Meson trace: simple: pass trace_file unmodified to config-host.h configure, meson: move fuzzing configuration to Meson ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'util/qemu-thread-posix.c')
-rw-r--r--util/qemu-thread-posix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index 6c5004220d..e1225b63bd 100644
--- a/util/qemu-thread-posix.c
+++ b/util/qemu-thread-posix.c
@@ -23,7 +23,8 @@ void qemu_thread_naming(bool enable)
{
name_threads = enable;
-#ifndef CONFIG_THREAD_SETNAME_BYTHREAD
+#if !defined CONFIG_PTHREAD_SETNAME_NP_W_TID && \
+ !defined CONFIG_PTHREAD_SETNAME_NP_WO_TID
/* This is a debugging option, not fatal */
if (enable) {
fprintf(stderr, "qemu: thread naming not supported on this host\n");
@@ -522,7 +523,6 @@ static void *qemu_thread_start(void *args)
void *arg = qemu_thread_args->arg;
void *r;
-#ifdef CONFIG_THREAD_SETNAME_BYTHREAD
/* Attempt to set the threads name; note that this is for debug, so
* we're not going to fail if we can't set it.
*/
@@ -533,7 +533,6 @@ static void *qemu_thread_start(void *args)
pthread_setname_np(qemu_thread_args->name);
# endif
}
-#endif
QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name);
g_free(qemu_thread_args->name);
g_free(qemu_thread_args);