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 ADEA441D5F; Fri, 24 Feb 2023 16:13:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A147742D52; Fri, 24 Feb 2023 16:12:50 +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 6EC0242D44 for ; Fri, 24 Feb 2023 16:12:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677251569; 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=GG+VE/hQPkh0vpXYERM6KnBZ6Pq1nqAwckzjQfIDZ8c=; b=TN/K1dTNefRR//lY0e5wUwxFNhjU5lIuhkjZpQOiLQhoGuPmqYDeXlVG8Xr0eFREI7iqJe sOMHXv+rF1mNjO7+z+VVQpEN9+qpd9doPnGbsHi9JkmUhjdXQLJXetdApqnUTTSL9Fh+jV t/fhUsziSvR5IIAC2lIoEGaghH7yFxI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-GiB4iw4lPcWH2TU3NFYg5w-1; Fri, 24 Feb 2023 10:12:43 -0500 X-MC-Unique: GiB4iw4lPcWH2TU3NFYg5w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5214C85A588; Fri, 24 Feb 2023 15:12:43 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B69A404BEC0; Fri, 24 Feb 2023 15:12:42 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou Subject: [PATCH v2 18/20] net/hinic: annotate pthread mutex Date: Fri, 24 Feb 2023 16:11:41 +0100 Message-Id: <20230224151143.3274897-19-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.1 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/hinic/base/hinic_compat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h index aea332046e..89732ca11a 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h @@ -224,6 +224,9 @@ static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex) } static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex) +#ifdef RTE_EXEC_ENV_FREEBSD + __rte_exclusive_trylock_function(0, *pthreadmutex) +#endif { int err; struct timespec tout; @@ -239,6 +242,9 @@ static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex) } static inline int hinic_mutex_unlock(pthread_mutex_t *pthreadmutex) +#ifdef RTE_EXEC_ENV_FREEBSD + __rte_unlock_function(*pthreadmutex) +#endif { return pthread_mutex_unlock(pthreadmutex); } -- 2.39.2