summary refs log tree commit diff stats
path: root/util/qemu-thread-posix.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2025-05-26 14:29:14 +0900
committerPaolo Bonzini <pbonzini@redhat.com>2025-06-06 14:32:55 +0200
commit32da70a88780a167affde071fb2410ca2da58eaa (patch)
tree6fb710fe7abfab9993aa9966ab4c037532eb4b71 /util/qemu-thread-posix.c
parent1bc2c495395bfad526b50d84f4db5687ce1d3963 (diff)
downloadfocaccia-qemu-32da70a88780a167affde071fb2410ca2da58eaa.tar.gz
focaccia-qemu-32da70a88780a167affde071fb2410ca2da58eaa.zip
qemu-thread: Replace __linux__ with CONFIG_LINUX
scripts/checkpatch.pl warns for __linux__ saying "architecture specific
defines should be avoided".

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250526-event-v4-4-5b784cc8e1de@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/qemu-thread-posix.c')
-rw-r--r--util/qemu-thread-posix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index f80f564e76..3dc4d30052 100644
--- a/util/qemu-thread-posix.c
+++ b/util/qemu-thread-posix.c
@@ -317,7 +317,7 @@ void qemu_sem_wait(QemuSemaphore *sem)
     qemu_mutex_unlock(&sem->mutex);
 }
 
-#ifdef __linux__
+#ifdef CONFIG_LINUX
 #include "qemu/futex.h"
 #else
 static inline void qemu_futex_wake(QemuEvent *ev, int n)
@@ -363,7 +363,7 @@ static inline void qemu_futex_wait(QemuEvent *ev, unsigned val)
 
 void qemu_event_init(QemuEvent *ev, bool init)
 {
-#ifndef __linux__
+#ifndef CONFIG_LINUX
     pthread_mutex_init(&ev->lock, NULL);
     pthread_cond_init(&ev->cond, NULL);
 #endif
@@ -376,7 +376,7 @@ void qemu_event_destroy(QemuEvent *ev)
 {
     assert(ev->initialized);
     ev->initialized = false;
-#ifndef __linux__
+#ifndef CONFIG_LINUX
     pthread_mutex_destroy(&ev->lock);
     pthread_cond_destroy(&ev->cond);
 #endif