From patchwork Wed Jan 14 22:48:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 43133 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF446240B9 for ; Wed, 14 Jan 2015 22:49:39 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf6242111lab.3 for ; Wed, 14 Jan 2015 14:49:38 -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:in-reply-to :references: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=pk4hqx6tEPVq+GZRpZYmTCbnYOMXOQCRGqOaRw6zV9Q=; b=UlpxK2149qphiS8ksqGad79XLs0N/cIhRu3bfgbUutLIwA1h3Wzu4Yer5naaaxCIxo i0v+wY8A7vD2Q7pA0kgB0Chwfq3kQ+MzuSgX/5rOFfazM0HjzB2d3hijTXy+Nkz22/59 8E6l3d7GuC7Qo1PO6D8+296vKyZzuu5phha6N/wKBoDK+9ALzUu/o12h28v4cLpkoJYB Hgl8zAbLPEox7mAyLlXpF2TzhxGRzr337mLhT7WLBtaWTIWs3WY7lipRthiB0sBY4alw aIWiwLFH2VxCBsRutSsNDYdzdhTAs2I/bLv9es8uH18DcQbh2nr/YBvZQgi8HLlfzzVF Ac6Q== X-Gm-Message-State: ALoCoQmAxqA41Y0Rgf8/pAZThxLvHywt7W0Up5OXLHhm3+ljEEWkzz5hpuJzsdHmb7oY11RkrPD2 X-Received: by 10.180.77.167 with SMTP id t7mr3901005wiw.6.1421275778729; Wed, 14 Jan 2015 14:49:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.196 with SMTP id ba4ls179140lab.40.gmail; Wed, 14 Jan 2015 14:49:38 -0800 (PST) X-Received: by 10.112.57.226 with SMTP id l2mr46890lbq.27.1421275778573; Wed, 14 Jan 2015 14:49:38 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id o8si7135105laj.121.2015.01.14.14.49.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 14:49:38 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ms9so10739230lab.10 for ; Wed, 14 Jan 2015 14:49:38 -0800 (PST) X-Received: by 10.112.98.99 with SMTP id eh3mr6507966lbb.32.1421275778484; Wed, 14 Jan 2015 14:49:38 -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.9.200 with SMTP id c8csp1845612lbb; Wed, 14 Jan 2015 14:49:37 -0800 (PST) X-Received: by 10.229.248.69 with SMTP id mf5mr11371741qcb.29.1421275777222; Wed, 14 Jan 2015 14:49:37 -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 l78si33048345qgd.65.2015.01.14.14.49.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 14 Jan 2015 14:49:37 -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 1YBWko-0000ER-JG; Wed, 14 Jan 2015 22:49:34 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YBWka-0000BA-Fw for lng-odp@lists.linaro.org; Wed, 14 Jan 2015 22:49:20 +0000 Received: by mail-la0-f52.google.com with SMTP id hs14so10761489lab.11 for ; Wed, 14 Jan 2015 14:49:15 -0800 (PST) X-Received: by 10.152.42.164 with SMTP id p4mr188919lal.45.1421275754894; Wed, 14 Jan 2015 14:49:14 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id l3sm6309532lbs.13.2015.01.14.14.49.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jan 2015 14:49:14 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Wed, 14 Jan 2015 23:48:21 +0100 Message-Id: <1421275706-11176-5-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421275706-11176-1-git-send-email-anders.roxell@linaro.org> References: <1421275706-11176-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 4/9] api: cpumask: add odp_cpumask_copy 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: anders.roxell@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.51 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 From: Robbie King To be able to copy a const mask so it can be modified. Signed-off-by: Robbie King Signed-off-by: Anders Roxell --- platform/linux-generic/include/api/odp_cpumask.h | 5 +++++ platform/linux-generic/odp_cpumask.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/platform/linux-generic/include/api/odp_cpumask.h b/platform/linux-generic/include/api/odp_cpumask.h index 2e10c4e..0090f9a 100644 --- a/platform/linux-generic/include/api/odp_cpumask.h +++ b/platform/linux-generic/include/api/odp_cpumask.h @@ -127,6 +127,11 @@ int odp_cpumask_equal(const odp_cpumask_t *mask1, const odp_cpumask_t *mask2); /** + * Copy a CPU mask + */ +void odp_cpumask_copy(odp_cpumask_t *dest, const odp_cpumask_t *src); + +/** * @} */ diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c index c15a971..6be7f1e 100644 --- a/platform/linux-generic/odp_cpumask.c +++ b/platform/linux-generic/odp_cpumask.c @@ -170,3 +170,8 @@ int odp_cpumask_equal(const odp_cpumask_t *mask1, { return CPU_EQUAL(&mask1->set, &mask2->set); } + +void odp_cpumask_copy(odp_cpumask_t *dest, const odp_cpumask_t *src) +{ + memcpy(&dest->set, &src->set, sizeof(src->set)); +}