From patchwork Tue Nov 8 09:49:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 81259 Delivered-To: patch@linaro.org Received: by 10.182.113.165 with SMTP id iz5csp1574134obb; Tue, 8 Nov 2016 00:51:27 -0800 (PST) X-Received: by 10.237.38.226 with SMTP id q89mr11483313qtd.153.1478595087146; Tue, 08 Nov 2016 00:51:27 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a16si19077117qtb.121.2016.11.08.00.51.26; Tue, 08 Nov 2016 00:51:27 -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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CEC7260D48; Tue, 8 Nov 2016 08:51:26 +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 2B8AF60D4F; Tue, 8 Nov 2016 08:50:24 +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 7BE1C60CF5; Tue, 8 Nov 2016 08:50:16 +0000 (UTC) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by lists.linaro.org (Postfix) with ESMTPS id 45E2C60CF5 for ; Tue, 8 Nov 2016 08:50:14 +0000 (UTC) Received: by mail-lf0-f47.google.com with SMTP id o141so61596980lff.1 for ; Tue, 08 Nov 2016 00:50:14 -0800 (PST) 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=Xe62zC6Yx/Eryh58/0x3pH9RUtQ/zSwqjVdLV+cd1DM=; b=Fks0G/QBQflHHWWHOCNbsKRTTRRmg3cZCYXla/s2Xp2GS4Fmqe1aoMxAKwzqua5/jE gGS8XBLpgBMt0R9sc/pFZFNRRJ3nHIid8lHYvlcj3dcF1a326EeBGYW8Ki/FHCJ/xV8L h2jLdbKtG4pV7nQjqQnOoAebock0UGnZh8jLeSqATXyM2uF/JhFI8zuvUqvcvBu2hwld cIXiCG2TZE/EgNCqBR2T+/eosCLmePnJu3/2AG2gc4dcKFEFY/OEY1cVu+ZJgu49wtXG pMkFFzI529iltz9rC8mO2idH2JtjR5PNQ1TYgYSf+47H1SrvtwqVgQDxigXcCQb8jlhU gbgw== X-Gm-Message-State: ABUngvfXzWfgjpP8jLNZ2JOTMS4HVdUXfgXrkpsRYihl6bjflteyfFjKX+Gb5wFWXKIz9JzwUMA= X-Received: by 10.25.41.203 with SMTP id p194mr6327626lfp.108.1478595013056; Tue, 08 Nov 2016 00:50:13 -0800 (PST) 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 i129sm4677636lfd.8.2016.11.08.00.50.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Nov 2016 00:50:12 -0800 (PST) From: Christophe Milard To: petri.savolainen@nokia.com, mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Tue, 8 Nov 2016 10:49:30 +0100 Message-Id: <1478598570-2846-4-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478598570-2846-1-git-send-email-christophe.milard@linaro.org> References: <1478598570-2846-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 3/3] doc: shm: defining behaviour when blocks have same name 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" Defining the reserve and lookup behaviour when multiple blocks are reserved using the same name. Signed-off-by: Christophe Milard --- doc/users-guide/users-guide.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index a9dc64f..3434a60 100755 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -594,7 +594,9 @@ resource. Blocks of shared memory can be created using the `odp_shm_reserve()` API call. The call expects a shared memory block name, a block size, an alignment requirement, and optional flags as parameters. It returns a `odp_shm_t` -handle. The size and alignment requirement are given in bytes. +handle. The size and alignment requirement are given in bytes. The provided +name does not have to be unique, i.e. a given name can be used multiple times, +when reserving different blocks. .creating a block of shared memory [source,c] @@ -670,7 +672,9 @@ block is to use the `odp_shm_lookup()` API function call. This nevertheless requires the calling ODP thread to provide the name of the shared memory block: `odp_shm_lookup()` will return `ODP_SHM_INVALID` if no shared memory block -with the provided name is known by ODP. +with the provided name is known by ODP. When multiple blocks were reserved +using the same name, the lookup function will return the handle of any +of these blocks. .retrieving a block handle and address from another ODP task [source,c]