From patchwork Fri Oct 7 10:35:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 77325 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp246592qge; Fri, 7 Oct 2016 02:38:38 -0700 (PDT) X-Received: by 10.200.45.124 with SMTP id o57mr17524626qta.90.1475833118063; Fri, 07 Oct 2016 02:38:38 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n88si9813076qkl.10.2016.10.07.02.38.36; Fri, 07 Oct 2016 02:38:38 -0700 (PDT) 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2AC95617AD; Fri, 7 Oct 2016 09:38:36 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 421E1617C1; Fri, 7 Oct 2016 09:36:45 +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 7882E617AF; Fri, 7 Oct 2016 09:36:30 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id BB98A617BF for ; Fri, 7 Oct 2016 09:36:18 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id x79so36818758lff.0 for ; Fri, 07 Oct 2016 02:36:18 -0700 (PDT) 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=yGw+m0XSB+RN0yPXkjsPEhnmiRaoHlgzNMpDJwMjTFw=; b=bgtjGUJmN40myGMUr0w+0/Hoq9GUm0Hill1k3uHRMcc/d/5oCCE9NIYFmgyG7YRsO/ mgorhT/3rMYKk0ITMkliWpcOntRVH35v5L4f/4ENsL2AePHAHRXTiWcCWTo96CQbmSEp 6QgD87OkBghiec77i1kuEdyUuMFpdC3iu0ZVuV+hW0mvKTfZZEGT1yCDc2k6E2zN7RST yLHxL+Eh7p+YTpgnwO6IywWb1sn90rPaBWhbRtkFtUHLfKArbGnYMgzrtkX/x3k6oid5 ODSChly2x6SSfk2VVh7S4jE4/NwF/dcDsYEKTQlJkiC61kArp9KizFAWhDIZ1H/Xo87c 1T4w== X-Gm-Message-State: AA6/9RlmIJg1gWtokJ7EHJxGzjKzrr5pcr/vaB6r873pcvJfHaUMVpYqSx2hiMZjsU106d0iIEY= X-Received: by 10.25.24.39 with SMTP id o39mr2740177lfi.151.1475832976395; Fri, 07 Oct 2016 02:36:16 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id 5sm3465255ljb.22.2016.10.07.02.36.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Oct 2016 02:36:15 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Fri, 7 Oct 2016 12:35:07 +0200 Message-Id: <1475836517-60484-5-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475836517-60484-1-git-send-email-christophe.milard@linaro.org> References: <1475836517-60484-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 04/14] api: shm: add flag to guarantee address unicity on all ODP threads 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The ODP_SHM_SINGLE_VA flag is created: when set (at odp_shm_reserve()), this flag guarantees that all ODP threads sharing this memory block will see the block at the same address (regadless of ODP thread type -pthread vs process- or fork time) Signed-off-by: Christophe Milard --- include/odp/api/spec/shared_memory.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h index 8c76807..fefb5d6 100644 --- a/include/odp/api/spec/shared_memory.h +++ b/include/odp/api/spec/shared_memory.h @@ -45,10 +45,9 @@ extern "C" { /* * Shared memory flags */ - -/* Share level */ -#define ODP_SHM_SW_ONLY 0x1 /**< Application SW only, no HW access */ -#define ODP_SHM_PROC 0x2 /**< Share with external processes */ +#define ODP_SHM_SW_ONLY 0x1 /**< Application SW only, no HW access */ +#define ODP_SHM_PROC 0x2 /**< Share with external processes */ +#define ODP_SHM_SINGLE_VA 0x4 /**< guarantee unique addr on all threads*/ /** * Shared memory block info