[PATCH v2 19/20] eal/windows: disable lock check on alarm code

David Marchand david.marchand at redhat.com
Fri Feb 24 16:11:42 CET 2023


This code uses locks to implement synchronisation between two threads.
There seems nothing wrong with it, just silence the clang lock check.

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 lib/eal/windows/eal_alarm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/eal/windows/eal_alarm.c b/lib/eal/windows/eal_alarm.c
index 48203a2870..34b52380ce 100644
--- a/lib/eal/windows/eal_alarm.c
+++ b/lib/eal/windows/eal_alarm.c
@@ -224,6 +224,7 @@ struct intr_task {
 
 static void
 intr_thread_entry(void *arg)
+	__rte_no_thread_safety_analysis
 {
 	struct intr_task *task = arg;
 	task->func(task->arg);
@@ -232,6 +233,7 @@ intr_thread_entry(void *arg)
 
 static int
 intr_thread_exec_sync(void (*func)(void *arg), void *arg)
+	__rte_no_thread_safety_analysis
 {
 	struct intr_task task;
 	int ret;
-- 
2.39.2



More information about the dev mailing list