From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B380741D5F; Fri, 24 Feb 2023 16:13:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13EA542D3D; Fri, 24 Feb 2023 16:12:46 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 567CF42C24 for ; Fri, 24 Feb 2023 16:12:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677251563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1x0ozyplJfxRGA50pWZ/HfMRUddCkTN1RWYJADUinE0=; b=i8HJbaQBIhgJAhN9HynGw8Yfw+9MPoLzzGnL2Dz/qkPBgtso1cG7VqpR4l1obghcS15/AY Jv0CqWMXnzULCQOFSAV0fzyLI7PW4GXiOePu0ipROplpOdTTL0QZcLIh3GIRI1BoHx+amV Tp9GtfJNh929vMShOYqsl3tIOny40EE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-550-2NBkWV70P0aY2lIwhTSp-Q-1; Fri, 24 Feb 2023 10:12:40 -0500 X-MC-Unique: 2NBkWV70P0aY2lIwhTSp-Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B0401C04184; Fri, 24 Feb 2023 15:12:40 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A4AA492B07; Fri, 24 Feb 2023 15:12:39 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Gaetan Rivet Subject: [PATCH v2 17/20] net/failsafe: annotate pthread mutex Date: Fri, 24 Feb 2023 16:11:40 +0100 Message-Id: <20230224151143.3274897-18-david.marchand@redhat.com> In-Reply-To: <20230224151143.3274897-1-david.marchand@redhat.com> References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230224151143.3274897-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Annotate wrappers on top of the pthread mutex API. Signed-off-by: David Marchand --- 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