From patchwork Mon Apr 28 11:41:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29222 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8220120553 for ; Mon, 28 Apr 2014 11:42:59 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id fp1sf15537535pdb.6 for ; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) 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:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=h91+NgG5ahmEyuTyWtJM5pUGndsfmDY/BoGiynRpyzE=; b=caLtuJCkn5DEzNzTD7RT2HrUy6tPda+QYx/x9hTFtlDtyHyJrg0QUc+Hu6t7QInwZ5 64+XqSw/75h8wQZuWNWb3JF/LiwmPuaAAc4DEGwAfp+G5q0tKXUU8z68t3uMPfmRj+jB 6O9xCGtgzcJDKNUjE1n6rZmPgY0eGQ/qRbeTCmsRUMx0wr2OOcFtB+UlEJZ7nKANQYEG 1EIEvpoacXCnhQmQk2xn5ZZg8VXpbq1GThi3AT+jxVwemXK6Ztiq4vho4TcgBPh5h9ow V7F6SAjWdtj9o0cyibvOPVZ5/NzQ7D0swWRV91W+uN8upxYx80WcFDqT3eUS5coXdeBt SOlQ== X-Gm-Message-State: ALoCoQkCDfMTU8VEocHVBzUR7bLRnlGRdQnrK3NP+peUiTYikymNOUw/MQAUfX6G7Cjk1doE6ZXQ X-Received: by 10.66.233.8 with SMTP id ts8mr12909965pac.38.1398685378714; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.52 with SMTP id e49ls2568988qge.19.gmail; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) X-Received: by 10.52.113.1 with SMTP id iu1mr986792vdb.35.1398685378493; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id vd8si3541340vdc.142.2014.04.28.04.42.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:58 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so7655049veb.26 for ; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr23119565vec.15.1398685378420; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) 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.220.221.72 with SMTP id ib8csp110852vcb; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) X-Received: by 10.224.166.201 with SMTP id n9mr7378qay.95.1398685378041; Mon, 28 Apr 2014 04:42:58 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id k50si7635708qge.25.2014.04.28.04.42.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:58 -0700 (PDT) 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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejx7-0002rl-9T; Mon, 28 Apr 2014 11:42:29 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejw5-0002md-Hj for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:25 +0000 Received: by mail-lb0-f174.google.com with SMTP id c11so2035204lbj.5 for ; Mon, 28 Apr 2014 04:41:47 -0700 (PDT) X-Received: by 10.152.116.78 with SMTP id ju14mr10833lab.62.1398685307693; Mon, 28 Apr 2014 04:41:47 -0700 (PDT) Received: from uglx0153363.itg.ti.com ([195.238.92.128]) by mx.google.com with ESMTPSA id x10sm9873857lad.1.2014.04.28.04.41.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:46 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:12 +0300 Message-Id: <1398685276-4610-14-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398685276-4610-1-git-send-email-taras.kondratiuk@linaro.org> References: <1398685276-4610-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: patch Cc: linaro-networking@linaro.org Subject: [lng-odp] [RFC PATCH 13/17] Split out platform-specific part of odp_spinlock.h 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: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 --- include/odp_spinlock.h | 6 ++--- platform/linux-generic/include/plat/odp_spinlock.h | 27 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_spinlock.h diff --git a/include/odp_spinlock.h b/include/odp_spinlock.h index f25d068..7dd59be 100644 --- a/include/odp_spinlock.h +++ b/include/odp_spinlock.h @@ -20,14 +20,12 @@ extern "C" { #include - +#include /** * ODP spinlock */ -typedef struct odp_spinlock_t { - volatile int lock; /**< @private Lock */ -} odp_spinlock_t; +typedef plat_odp_spinlock_t odp_spinlock_t; /** diff --git a/platform/linux-generic/include/plat/odp_spinlock.h b/platform/linux-generic/include/plat/odp_spinlock.h new file mode 100644 index 0000000..f980a3d --- /dev/null +++ b/platform/linux-generic/include/plat/odp_spinlock.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP spinlock + */ + +#ifndef ODP_SPINLOCK_H_ +#error This file should be included only into corresponding top level header +#else + +#include + +/** + * ODP spinlock + */ +typedef struct odp_spinlock_t { + volatile int lock; /**< @private Lock */ +} plat_odp_spinlock_t; + +#endif