[v2,14/20] ipc: annotate pthread mutex

Message ID 20230224151143.3274897-15-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Enable lock annotations on most libraries and drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Feb. 24, 2023, 3:11 p.m. UTC
  pthread_cond_timedwait() requires pending_requests.lock being taken.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/eal_common_proc.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index 1fc1d6c53b..aa060ae4dc 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -908,6 +908,9 @@  mp_request_async(const char *dst, struct rte_mp_msg *req,
 static int
 mp_request_sync(const char *dst, struct rte_mp_msg *req,
 	       struct rte_mp_reply *reply, const struct timespec *ts)
+#ifdef RTE_EXEC_ENV_FREEBSD
+	__rte_exclusive_locks_required(pending_requests.lock)
+#endif
 {
 	int ret;
 	pthread_condattr_t attr;