From patchwork Tue Jun 17 17:55:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 32100 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6DB2820C81 for ; Tue, 17 Jun 2014 17:56:51 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tr6sf44033802ieb.7 for ; Tue, 17 Jun 2014 10:56:51 -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: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=eM3CvtOXITS3Nrg+lgeWG0KWcEJXQxU2Ub7y3KNGJQA=; b=b1UucbninJj8IY6TqFTJg7Yw6FlYlD2f3j6oSUdWre+VKLNYNrVXFBKW0g5gZI35Vl 45W5sM9NwT2tHX1Bb7hD3OJTQUdHvnm5+ILgi1a+WfkyuBGYpOVvY76B+S1YnAuUnkIu d1/zePbiwi8ik9focp5lhiMjeCbT6RBYjJYn+BOo+7G9GsDR9GkMlZ2xsUcQpGIBQnPj G70qbOVqbsFVns8WxUr4b/ja554oNUzvYuN3tC7NDBSK72rBcbjh2koqJFrv3ayZZR5G ns1Mmfu2Lw17MEUBMt14ngnNB02VYhtdQq2jVuX8iGoFzZLEbZcb98eKNqTbrPlsutUP AY8w== X-Gm-Message-State: ALoCoQk9QIlBkeJ8M/2O/S2XobXw5REHxurbQhA/+EB4/9mZUkubYxBv206I1s8XQfQVzzGmvKjX X-Received: by 10.42.109.148 with SMTP id l20mr342995icp.0.1403027810947; Tue, 17 Jun 2014 10:56:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.111 with SMTP id b102ls5031881qga.31.gmail; Tue, 17 Jun 2014 10:56:50 -0700 (PDT) X-Received: by 10.52.14.9 with SMTP id l9mr2514164vdc.41.1403027810829; Tue, 17 Jun 2014 10:56:50 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id jm9si1096895vec.86.2014.06.17.10.56.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 as permitted sender) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id sa20so6011589veb.24 for ; Tue, 17 Jun 2014 10:56:50 -0700 (PDT) X-Received: by 10.58.152.234 with SMTP id vb10mr23161702veb.21.1403027810752; Tue, 17 Jun 2014 10:56:50 -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.221.54.6 with SMTP id vs6csp227602vcb; Tue, 17 Jun 2014 10:56:50 -0700 (PDT) X-Received: by 10.224.151.206 with SMTP id d14mr38075146qaw.35.1403027810320; Tue, 17 Jun 2014 10:56:50 -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 o10si17875241qag.14.2014.06.17.10.56.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:50 -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 1Wwxb8-0004x1-An; Tue, 17 Jun 2014 17:55:06 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wwxa9-0004nj-Em for lng-odp@lists.linaro.org; Tue, 17 Jun 2014 17:54:05 +0000 Received: by mail-la0-f49.google.com with SMTP id gf5so3532375lab.8 for ; Tue, 17 Jun 2014 10:55:42 -0700 (PDT) X-Received: by 10.112.52.167 with SMTP id u7mr18245058lbo.28.1403027742427; Tue, 17 Jun 2014 10:55:42 -0700 (PDT) Received: from localhost.localdomain (176-241-155-136-dynamic.retail.datagroup.ua. [176.241.155.136]) by mx.google.com with ESMTPSA id d3sm11646351lbw.2.2014.06.17.10.55.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:55:41 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 17 Jun 2014 20:55:17 +0300 Message-Id: <1403027720-9738-16-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403027720-9738-1-git-send-email-taras.kondratiuk@linaro.org> References: <1403027720-9738-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 15/18] Split out platform-specific part of odp_rwlock.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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 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 Signed-off-by: Taras Kondratiuk --- include/odp_rwlock.h | 9 +++----- platform/linux-generic/include/plat/odp_rwlock.h | 26 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_rwlock.h diff --git a/include/odp_rwlock.h b/include/odp_rwlock.h index 252ebb2..ee785fc 100644 --- a/include/odp_rwlock.h +++ b/include/odp_rwlock.h @@ -17,15 +17,12 @@ extern "C" { #endif +#include + /** * The odp_rwlock_t type. - * write lock count is -1, - * read lock count > 0 */ -typedef struct { - volatile int32_t cnt; /**< -1 Write lock, - > 0 for Read lock. */ -} odp_rwlock_t; +typedef plat_odp_rwlock_t odp_rwlock_t; /** diff --git a/platform/linux-generic/include/plat/odp_rwlock.h b/platform/linux-generic/include/plat/odp_rwlock.h new file mode 100644 index 0000000..fc12d05 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_rwlock.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_RWLOCK_H_ +#error This file should be included only into corresponding top level header +#else + +/** + * @file + * + * ODP RW Locks + */ + +/** + * write lock count is -1, + * read lock count > 0 + */ +typedef struct { + volatile int32_t cnt; /**< -1 Write lock, + > 0 for Read lock. */ +} plat_odp_rwlock_t; + +#endif /* ODP_RWLOCK_H_ */