From patchwork Wed Nov 11 01:42:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 56362 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1098031lbb; Tue, 10 Nov 2015 17:43:59 -0800 (PST) X-Received: by 10.129.32.70 with SMTP id g67mr6295247ywg.73.1447206238968; Tue, 10 Nov 2015 17:43:58 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g82si4031141ywa.412.2015.11.10.17.43.58; Tue, 10 Nov 2015 17:43:58 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 7730761B2C; Wed, 11 Nov 2015 01:43:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 72C8361CDB; Wed, 11 Nov 2015 01:43:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 87AEF61B3F; Wed, 11 Nov 2015 01:43:02 +0000 (UTC) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by lists.linaro.org (Postfix) with ESMTPS id C785F61A25 for ; Wed, 11 Nov 2015 01:43:00 +0000 (UTC) Received: by pabfh17 with SMTP id fh17so14889493pab.0 for ; Tue, 10 Nov 2015 17:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EBltFrxfgk479ca0Ys1FksZ1aN/l0o+e1O4qR5xc7lk=; b=lgAcSCB7LDqzxhAwVo0anV8yapNRAeYpCx6iGow3gbfnKtnQ/Cxkn+6QcOp5pWMylN Vw65xTxObTTLKB0xIoO/O7D/O/T+3sjUIBb43GJFhGnYDkqoy2UsqzzJ14grYwVcr+vf ATnweC5zDKnlVqy97hiC1v5xQGLfja4DsbgwBZiapEjNma6tJLSw+s+tGphRjyTDkFVu 7CnTSJlvv6jIVWD7rmApothaZCoDTtS02qxpqHuwr7ayV7zeL3jc72DIZt+ske5PP3CT CuqOl9622KCtv7KiVXxQc83I7no2Vh8fZ+NMVKbksEnQuZ5nhyIYSwroAcDtWBYTstQG 1kig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EBltFrxfgk479ca0Ys1FksZ1aN/l0o+e1O4qR5xc7lk=; b=gDnbjusCqBjSXyjDjKXgIA1mc1uZGP/bbm85EAWpMB0dJh69MpBpBOfsxXqGge54c8 5dTYK7I3qOSSfFd1FaO8dThlmz6QY861TA5X34A9WRprLM/Ag3UeR1QnA2A2cWyAbOeL nyRaiSUVH3m11eYoSB52Q/8Pb8uA1gU2dUCXt34e8M+7UEm/dcbnDVSUlGCBYSAZpytM aIczBx3bFQqxw6Z98JhMykYDBIL+WSeggsY+yHa0RayYD8Er8Hy+RjZzHTGQjYdHt6FC B0mz0pjBjQ5fRyYQu43F7CfX/LlaRV/kEAKr+EIv0pkdXZ1e104errRrzItWQKNibT10 qWnQ== X-Gm-Message-State: ALoCoQlK0g6OudDFGRbjigVGR7x1wegODq3c8JA0qbpDlgbp5JiO4ov4C17LxdoEf0IY5xQjatxP X-Received: by 10.66.191.68 with SMTP id gw4mr10549372pac.42.1447206180047; Tue, 10 Nov 2015 17:43:00 -0800 (PST) Received: from Ubuntu15.localdomain ([70.35.39.246]) by smtp.gmail.com with ESMTPSA id vg7sm6516669pbc.2.2015.11.10.17.42.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 17:42:59 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 10 Nov 2015 17:42:53 -0800 Message-Id: <1447206173-31970-3-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447206173-31970-1-git-send-email-bill.fischofer@linaro.org> References: <1447206173-31970-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 3/3] linux-generic: locks: revise implementation of recursive rwlocks X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Change linux-generic implementation of rwlock_recursive types to reference the externally visible ODP_CONFIG_THREADS symbol rather than the internal _ODP_INTERNAL_MAX_THREADS symbol. This avoids causing issues with installed copies of ODP that do not export internal symbols. Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp/plat/rwlock_recursive_types.h | 4 ++-- platform/linux-generic/include/odp_config_internal.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h b/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h index d5bfb92..5989e26 100644 --- a/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h +++ b/platform/linux-generic/include/odp/plat/rwlock_recursive_types.h @@ -19,14 +19,14 @@ extern "C" { #include #include -#include +#include /** @internal */ struct odp_rwlock_recursive_s { odp_rwlock_t lock; /**< the lock */ int wr_owner; /**< write owner thread */ uint32_t wr_cnt; /**< write recursion count */ - uint8_t rd_cnt[_ODP_INTERNAL_MAX_THREADS]; /**< read recursion count */ + uint8_t rd_cnt[ODP_CONFIG_THREADS]; /**< read recursion count */ }; typedef struct odp_rwlock_recursive_s odp_rwlock_recursive_t; diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h index 4f20ff8..c484ce6 100644 --- a/platform/linux-generic/include/odp_config_internal.h +++ b/platform/linux-generic/include/odp_config_internal.h @@ -20,7 +20,7 @@ extern "C" { /** * Maximum number of threads */ -#define _ODP_INTERNAL_MAX_THREADS 128 +#define _ODP_INTERNAL_MAX_THREADS ODP_CONFIG_THREADS #ifdef __cplusplus }