From patchwork Tue Jun 17 17:55:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 32102 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DC1BD20C81 for ; Tue, 17 Jun 2014 17:56:59 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 20sf18901630yks.11 for ; Tue, 17 Jun 2014 10:56:59 -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=EvUk9Jfx77X2xfq5wj33S9KuiZ+HBAJiAGivr1WCHuo=; b=Ouu/oMTbuoqvRb/4o71ZrHOOt51q08ejiiAby4C0wjuKnct2GedSHyDhAYh+mqVW99 YwUEuUIxO2qnxnBIHQMuMGMatCW8I4VSbU2Ua3weihy9gupL3hTbPbSMk1K7j5si+91w 8K0bPQ+GAn7SuFqoLmCcRj4BIfbdcmjXGkOEcBpdTWvCaclBRLq3dm8p8RRoN4off3KM 67ZqC9cgITu10qC3PeqyKVbLkdlwTyYC3hJ3AYsjl1yKvWrlPFHMJEe1JOKVlHs29S+v qFOkQMrzQ/wR3IXC93xaULisb54pJ7ZC2hHGfB8LwYIPw3Scdr4FjQ0gpPUF25j7dBqx ldow== X-Gm-Message-State: ALoCoQlSDhO1IaNrsNmUaghEMjcNLszkJSiaLzR03a8MpRKJo5xcfmLOCpp1sk3TgtkuwlkQkGmu X-Received: by 10.236.88.244 with SMTP id a80mr89748yhf.31.1403027819730; Tue, 17 Jun 2014 10:56:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.225 with SMTP id 88ls885940qgt.85.gmail; Tue, 17 Jun 2014 10:56:59 -0700 (PDT) X-Received: by 10.52.25.130 with SMTP id c2mr10709214vdg.27.1403027819664; Tue, 17 Jun 2014 10:56:59 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id em7si5761817vdb.53.2014.06.17.10.56.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so6737944vcb.35 for ; Tue, 17 Jun 2014 10:56:59 -0700 (PDT) X-Received: by 10.220.105.136 with SMTP id t8mr23056726vco.13.1403027819588; Tue, 17 Jun 2014 10:56:59 -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 vs6csp227617vcb; Tue, 17 Jun 2014 10:56:59 -0700 (PDT) X-Received: by 10.224.41.65 with SMTP id n1mr38703846qae.75.1403027819180; Tue, 17 Jun 2014 10:56:59 -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 bj7si17216609qcb.8.2014.06.17.10.56.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:56:59 -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 1WwxbH-0004yJ-4F; Tue, 17 Jun 2014 17:55:15 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WwxaB-0004nu-Ds for lng-odp@lists.linaro.org; Tue, 17 Jun 2014 17:54:07 +0000 Received: by mail-lb0-f173.google.com with SMTP id s7so4045956lbd.32 for ; Tue, 17 Jun 2014 10:55:44 -0700 (PDT) X-Received: by 10.112.157.130 with SMTP id wm2mr1232917lbb.38.1403027744318; Tue, 17 Jun 2014 10:55:44 -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.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 10:55:43 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 17 Jun 2014 20:55:19 +0300 Message-Id: <1403027720-9738-18-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 17/18] Split out platform-specific part of odp_ticketlock.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.220.176 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_ticketlock.h | 8 ++---- .../linux-generic/include/plat/odp_ticketlock.h | 29 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_ticketlock.h diff --git a/include/odp_ticketlock.h b/include/odp_ticketlock.h index 6277a18..d873a7f 100644 --- a/include/odp_ticketlock.h +++ b/include/odp_ticketlock.h @@ -20,16 +20,12 @@ extern "C" { #include -#include - +#include /** * ODP ticketlock */ -typedef struct odp_ticketlock_t { - odp_atomic_u32_t next_ticket; /**< @private Next ticket */ - volatile uint32_t cur_ticket; /**< @private Current ticket */ -} odp_ticketlock_t; +typedef plat_odp_ticketlock_t odp_ticketlock_t; /** diff --git a/platform/linux-generic/include/plat/odp_ticketlock.h b/platform/linux-generic/include/plat/odp_ticketlock.h new file mode 100644 index 0000000..3460c79 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_ticketlock.h @@ -0,0 +1,29 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP ticketlock + */ + +#ifndef ODP_TICKETLOCK_H_ +#error This file should be included only into corresponding top level header +#else + +#include +#include + +/** + * ODP ticketlock + */ +typedef struct odp_ticketlock_t { + odp_atomic_u32_t next_ticket; /**< @private Next ticket */ + volatile uint32_t cur_ticket; /**< @private Current ticket */ +} plat_odp_ticketlock_t; + +#endif