[PATCH v2 17/20] net/failsafe: annotate pthread mutex
David Marchand
david.marchand at redhat.com
Fri Feb 24 16:11:40 CET 2023
Annotate wrappers on top of the pthread mutex API.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
drivers/net/failsafe/failsafe_private.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 53a451c1b1..97b6f5300d 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -403,6 +403,9 @@ fs_dev(struct sub_device *sdev) {
*/
static inline int
fs_lock(struct rte_eth_dev *dev, unsigned int is_alarm)
+#ifdef RTE_EXEC_ENV_FREEBSD
+ __rte_exclusive_trylock_function(0, PRIV(dev)->hotplug_mutex)
+#endif
{
int ret;
@@ -430,6 +433,9 @@ fs_lock(struct rte_eth_dev *dev, unsigned int is_alarm)
*/
static inline void
fs_unlock(struct rte_eth_dev *dev, unsigned int is_alarm)
+#ifdef RTE_EXEC_ENV_FREEBSD
+ __rte_unlock_function(PRIV(dev)->hotplug_mutex)
+#endif
{
int ret;
--
2.39.2
More information about the dev
mailing list