From patchwork Mon Apr 28 11:41:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29223 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A7E920B8D for ; Mon, 28 Apr 2014 11:43:05 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf12910415yha.0 for ; Mon, 28 Apr 2014 04:43:04 -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=8btkuwduGtkzGiC6Ers2Mm1QfL6cw6vgyQ0gmg6iBrU=; b=doWVhfy0cxGwkbTZvNDaKPlVRaCaoIDFiUa/bcc/iNUco5jJFG4i/mtGxkWNrsNvzk da06B6Jna5Zs5FEd8j8hKuRzJ32vwlcFyKXwjtlI9MjixhhobiVVJtUQhj3nmAzEUJUP tCKNVQergiOYLGsbHYcnl6WT66pquQJ4NFVDioFveYWfv/hZW7BWFFAUAYcdjK/J9W3K OR+Mvo6HXjVHMeoibkIzCUF+KESdyj2zweluWLLu5KlczRsnHB2Om7yQUml8CqfarfhK AefQMmN0tdgdD6bfIlim32q4r9nqh0/1ZL994uEbBQ0W/5dWuOJjhtG1U23kjdKK0XoZ 4lJQ== X-Gm-Message-State: ALoCoQmOh1LQqFipUWpQ9MwRCYcVJ76PDsHFN/zmNdoUYUdYDSQ8qV9rgbTsdxmSXjEh6zTf1/A4 X-Received: by 10.236.112.4 with SMTP id x4mr742491yhg.56.1398685384957; Mon, 28 Apr 2014 04:43:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.87 with SMTP id v81ls2618808qge.0.gmail; Mon, 28 Apr 2014 04:43:04 -0700 (PDT) X-Received: by 10.220.133.197 with SMTP id g5mr23449489vct.20.1398685384846; Mon, 28 Apr 2014 04:43:04 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id sc7si3545910vdc.85.2014.04.28.04.43.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:43:04 -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.220.169; Received: by mail-vc0-f169.google.com with SMTP id im17so8111061vcb.0 for ; Mon, 28 Apr 2014 04:43:04 -0700 (PDT) X-Received: by 10.52.34.4 with SMTP id v4mr131387vdi.42.1398685384769; Mon, 28 Apr 2014 04:43:04 -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 ib8csp110858vcb; Mon, 28 Apr 2014 04:43:04 -0700 (PDT) X-Received: by 10.140.31.196 with SMTP id f62mr30100466qgf.59.1398685384335; Mon, 28 Apr 2014 04:43:04 -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 75si7668832qgm.131.2014.04.28.04.43.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:43:04 -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 1WejxD-0002s6-EM; Mon, 28 Apr 2014 11:42:35 +0000 Received: from mail-la0-f42.google.com ([209.85.215.42]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejw7-0002mm-0o for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:27 +0000 Received: by mail-la0-f42.google.com with SMTP id mc6so3829257lab.29 for ; Mon, 28 Apr 2014 04:41:49 -0700 (PDT) X-Received: by 10.152.87.71 with SMTP id v7mr19047250laz.10.1398685309149; Mon, 28 Apr 2014 04:41:49 -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.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:48 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:13 +0300 Message-Id: <1398685276-4610-15-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 14/17] 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=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_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_ */