aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-10-07 15:08:19 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-14 09:50:57 +0200
commit10f6b231879c94f34d3e6549c7b81b494d3cd1c2 (patch)
tree1cd97f7bcfcb9faa757dae4f06dec975396491ce /meson.build
parent96a63aeb3d6658b837523fee0df25300622e1dd0 (diff)
configure, meson: move pthread_setname_np checks to Meson
This makes the pthreads check dead in configure, so remove it as well. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130829.632254-9-pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build23
1 files changed, 23 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e8e728bf72..26fc4e5792 100644
--- a/meson.build
+++ b/meson.build
@@ -1584,6 +1584,29 @@ config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
#include <sys/mman.h>
#include <stddef.h>
int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }'''))
+
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links('''
+ #include <pthread.h>
+
+ static void *f(void *p) { return NULL; }
+ int main(void)
+ {
+ pthread_t thread;
+ pthread_create(&thread, 0, f, 0);
+ pthread_setname_np(thread, "QEMU");
+ return 0;
+ }''', dependencies: threads))
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links('''
+ #include <pthread.h>
+
+ static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
+ int main(void)
+ {
+ pthread_t thread;
+ pthread_create(&thread, 0, f, 0);
+ return 0;
+ }''', dependencies: threads))
+
config_host_data.set('CONFIG_SIGNALFD', cc.links(gnu_source_prefix + '''
#include <sys/signalfd.h>
#include <stddef.h>