From patchwork Sat Jan 31 13:21:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44078 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 090382188C for ; Sat, 31 Jan 2015 13:21:36 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf13085201wgg.0 for ; Sat, 31 Jan 2015 05:21:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=uKrDlq+TW4rUS3gNsRwH6/zVj/zpqs/yK8mmXAbT4Qc=; b=lOq+sD5bQ/FW6lKEC82/ka7/kd/ZhzMQptrwaY6yTV7Nnj3m8AucBslYTeOVnKYVjJ dDVvXfJa7/HvN6jwUQm4YAQ+8ojiRX2suZQy1ukorcCmtqFr8R8uZ+EC5GPOI+HQ1YKj yy44EhwrGmDYgfeHh9ey6VUFhpXAIo0+lM4SOKMNKjCZEBo7oRNukfAKIdi/y4cgIjTn H7Ex78L1Ok+jCfmsA4jrME4nUYpTiVRnPUUydjoPh9hUTvc4YOdBxL2yC/ckdXGAxWlN gezXq6U0JAgs6Qsp1STMFFHdoraxNPIXsDCx/0pxQvIifPmjE8D5043PPL0HxaiRYUNC M41Q== X-Gm-Message-State: ALoCoQnrPjK5T0qoxNmLE+KZydJNfOxg1arSOIsNKVyw7IAA3o1jQQdsZ85bE7IOgoiaGmUJ5UP3 X-Received: by 10.112.162.35 with SMTP id xx3mr1409648lbb.16.1422710495177; Sat, 31 Jan 2015 05:21:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.230 with SMTP id jr6ls534552lab.69.gmail; Sat, 31 Jan 2015 05:21:35 -0800 (PST) X-Received: by 10.113.11.12 with SMTP id ee12mr10869960lbd.79.1422710495035; Sat, 31 Jan 2015 05:21:35 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id c4si12348331lbv.53.2015.01.31.05.21.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 31 Jan 2015 05:21:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id hv19so28707725lab.13 for ; Sat, 31 Jan 2015 05:21:34 -0800 (PST) X-Received: by 10.112.122.52 with SMTP id lp20mr4574158lbb.98.1422710494824; Sat, 31 Jan 2015 05:21:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp273582lbj; Sat, 31 Jan 2015 05:21:34 -0800 (PST) X-Received: by 10.140.22.99 with SMTP id 90mr21522069qgm.72.1422710493630; Sat, 31 Jan 2015 05:21:33 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id hs4si15500562qcb.18.2015.01.31.05.21.31 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 31 Jan 2015 05:21:33 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YHXzM-0005Vd-HA; Sat, 31 Jan 2015 13:21:28 +0000 Received: from mail-qg0-f42.google.com ([209.85.192.42]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YHXzH-0005Tp-5Y for lng-odp@lists.linaro.org; Sat, 31 Jan 2015 13:21:23 +0000 Received: by mail-qg0-f42.google.com with SMTP id q107so41940533qgd.1 for ; Sat, 31 Jan 2015 05:21:18 -0800 (PST) X-Received: by 10.140.102.142 with SMTP id w14mr7200023qge.88.1422710477963; Sat, 31 Jan 2015 05:21:17 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id y74sm12868038qgd.49.2015.01.31.05.21.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Jan 2015 05:21:17 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Sat, 31 Jan 2015 08:21:06 -0500 Message-Id: <1422710467-17851-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] api: config: move ODP_SHM_NUM_BLOCKS to config.h X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 ODP_SHM_NUM_BLOCKS was defined down in the implementation, move it out to the config.h Signed-off-by: Mike Holmes --- include/odp/api/config.h | 6 ++++++ platform/linux-generic/odp_shared_memory.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/odp/api/config.h b/include/odp/api/config.h index 3529fca..16157b0 100644 --- a/include/odp/api/config.h +++ b/include/odp/api/config.h @@ -119,6 +119,12 @@ extern "C" { */ #define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_BUF_LEN_MIN*6) +/** Maximum number of shared memory blocks. + * + * Limits how many blocks are available for calls to odp_shm_reserve() + */ +#define ODP_SHM_NUM_BLOCKS 32 + /** * @} */ diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index 96d10e8..e157871 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -26,10 +27,6 @@ #include #include - -#define ODP_SHM_NUM_BLOCKS 32 - - typedef struct { char name[ODP_SHM_NAME_LEN]; uint64_t size;