From patchwork Wed Oct 19 15:29:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 78278 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp309368qge; Wed, 19 Oct 2016 08:32:21 -0700 (PDT) X-Received: by 10.200.50.215 with SMTP id a23mr6868830qtb.79.1476891140974; Wed, 19 Oct 2016 08:32:20 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m76si2047172qkh.71.2016.10.19.08.32.20; Wed, 19 Oct 2016 08:32:20 -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 42ECB61763; Wed, 19 Oct 2016 15:32:20 +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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 5AD5761714; Wed, 19 Oct 2016 15:30:19 +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 1069F616E8; Wed, 19 Oct 2016 15:30:08 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by lists.linaro.org (Postfix) with ESMTPS id 51DFE616E8 for ; Wed, 19 Oct 2016 15:30:05 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id x79so31492766lff.0 for ; Wed, 19 Oct 2016 08:30:05 -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=bvD5MAZwVXWBmV62p8faheTwWchGz1yhsuYtlaQWBiSTpoi9TvOhTTTZEYWmvPt+rj IZXbi8ID8x4IDtdKRTPGMxLCTJuarmPHUP7i064925hFOHDIY8H+kUB91pIFFjUvuiHl A1/5AYhoreiYhEklq9l+oki+W9BE/1OphU+ZWuv8LVLzluqVe83L+mcMmch1uKy1R+im 1ot3c1AyhqJnUztklonhn2gqjs9cbf5oUH79g7f5yeo1TeVvkjFWGfvKHZmIhmcHv4qI DDrD6yzNLn53N09vNtdOSPdmZBojdxZM6QPkGa+j48WnBKsW9Xzu9Zs3myv+xwbHtw/K o8Sg== X-Gm-Message-State: AA6/9Rndzul/MGTfpKu7NlG/tAVKKchFj01/NCVPD/EPbIqWPrwXic3fw8GEnMQWFaCO/VexuII= X-Received: by 10.25.19.227 with SMTP id 96mr4491813lft.154.1476891004104; Wed, 19 Oct 2016 08:30:04 -0700 (PDT) Received: from localhost.localdomain (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id w65sm10805536lff.16.2016.10.19.08.30.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Oct 2016 08:30:03 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Wed, 19 Oct 2016 17:29:40 +0200 Message-Id: <1476890991-4693-6-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476890991-4693-1-git-send-email-christophe.milard@linaro.org> References: <1476890991-4693-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3 05/16] 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