From patchwork Mon Oct 24 09:24:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 78889 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp2450124qge; Mon, 24 Oct 2016 01:31:08 -0700 (PDT) X-Received: by 10.55.133.198 with SMTP id h189mr15299127qkd.104.1477297868370; Mon, 24 Oct 2016 01:31:08 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v18si10276647qkb.171.2016.10.24.01.31.08; Mon, 24 Oct 2016 01:31:08 -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 0C4D660A4B; Mon, 24 Oct 2016 08:31:08 +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 9317D615EB; Mon, 24 Oct 2016 08:25:39 +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 16D5E615EB; Mon, 24 Oct 2016 08:25:36 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id ADF4660C4B for ; Mon, 24 Oct 2016 08:24:56 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id b75so187517145lfg.3 for ; Mon, 24 Oct 2016 01:24:56 -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=7eJww55psLP3S2zrdCke/V6eqG/4N+4blL8SiKqRzcQ=; b=k3NOM7TX7CORJWG87SPMbEIsEtcC3bq7ZETrq40jnBT4cbaF8pOjY9UN1Z0ZBTE84q bAhici2Jmkeh/Dscd8OxXgsHwc1u2XRntvdAVmAOk1IH2IEMDCnFVhsl68b4ozwn2XrA UBAFd70Gyott/sefK33b/uDe4ZCtXYyXQhWOwtkIoAOktamr3yyfxlLFN8rR9QyMRC8s uMqZwrJrmD81x+nV2J0TKEvX7qXlFHi0h6kMsxGGAApWsdwYFlS5OXH3T3eKvFPKxQLz 0hDUb/YAlhUeZVKOL3TqTNJdiFBgWkZK5DSULJ0tALreIQEUs2oFG/k4zsTNWpQdjgUY ZmYw== X-Gm-Message-State: ABUngvfUbdwK9snGpQ7rT4gox81BTlz20R+hNyiWmPl9BG1MIwUqri1toe2nwGpmSAPk8uQK52M= X-Received: by 10.25.207.131 with SMTP id f125mr4652209lfg.181.1477297495472; Mon, 24 Oct 2016 01:24:55 -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 y131sm2849878lfd.26.2016.10.24.01.24.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 01:24:54 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Mon, 24 Oct 2016 11:24:04 +0200 Message-Id: <1477301053-35938-8-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477301053-35938-1-git-send-email-christophe.milard@linaro.org> References: <1477301053-35938-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv4 07/16] api: shm: add flag to lock memory 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_LOCK flag is created: when set (at odp_shm_reserve()), this flag locks the reserved memory (prevent swapping) Signed-off-by: Christophe Milard --- include/odp/api/spec/shared_memory.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h index bd4731a..cccc470 100644 --- a/include/odp/api/spec/shared_memory.h +++ b/include/odp/api/spec/shared_memory.h @@ -55,6 +55,13 @@ extern "C" { * of ODP thread type (e.g. pthread vs. process (or fork process time)). */ #define ODP_SHM_SINGLE_VA 0x4 +/** + * Lock memory + * + * When set, this flag guarantees that this memory block will not + * be swapped out (nor physically moved in physical address space). + */ +#define ODP_SHM_LOCK 0x8 /** * Shared memory block info