From patchwork Mon Apr 28 11:41:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29225 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB15920553 for ; Mon, 28 Apr 2014 11:43:16 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf27090319veb.11 for ; Mon, 28 Apr 2014 04:43:16 -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=HJKOtBs8+uiuCSN6Mk6N1RbzsLitByDJGbDRp6/V1AQ=; b=Aby9yfeoN/Pu9ND5rUObVlhuXqZnPfVl8MlT2HayKaNBsQe9vEU+8qhLx7OZRl8aoa bSR9d0X9gnX+KWvjPZluLAeLJDqFcTgobxkXeUzjK2Eandk7TWK/d+RZ5gM7zRpWiOKG PjqYcPgU71GUccaQX+c/gJ97NaTOfZ34lMxsVNJ2NGvczNdxc3WMcxtQZOziNnUZxq7U 83lA93uJZvFVOVKQP7+ziwb4Bfbk+p+xhzThRBNck6SaxxKcTJo3OS5gzt/z8qQhDlaG T5D2PVfkBKlnadCOqschru3YyaR7QoXvMmwy3k/ty27v7u1dXAf6tRQeCdYaZw80xMKM /aWw== X-Gm-Message-State: ALoCoQkrk2WT+J3bhbLdF8NVfEd2HW6flHFw/Yo+XViim9mLjQQH7Olwws5oclehO50p+XEjEzpF X-Received: by 10.236.142.101 with SMTP id h65mr10453878yhj.1.1398685396634; Mon, 28 Apr 2014 04:43:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.72 with SMTP id s66ls2596391qgd.11.gmail; Mon, 28 Apr 2014 04:43:16 -0700 (PDT) X-Received: by 10.52.99.168 with SMTP id er8mr20213234vdb.26.1398685396507; Mon, 28 Apr 2014 04:43:16 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id tz5si3542868vdc.115.2014.04.28.04.43.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:43:16 -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.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so7830395veb.17 for ; Mon, 28 Apr 2014 04:43:16 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr454604vcb.32.1398685396427; Mon, 28 Apr 2014 04:43:16 -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 ib8csp110873vcb; Mon, 28 Apr 2014 04:43:16 -0700 (PDT) X-Received: by 10.224.30.131 with SMTP id u3mr32751145qac.50.1398685395805; Mon, 28 Apr 2014 04:43:15 -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 f7si7681905qge.48.2014.04.28.04.43.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:43:15 -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 1WejxP-0002sq-1s; Mon, 28 Apr 2014 11:42:47 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WejwA-0002nB-06 for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:30 +0000 Received: by mail-lb0-f177.google.com with SMTP id z11so4845153lbi.36 for ; Mon, 28 Apr 2014 04:41:52 -0700 (PDT) X-Received: by 10.152.7.8 with SMTP id f8mr1185224laa.39.1398685312089; Mon, 28 Apr 2014 04:41:52 -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.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:51 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:15 +0300 Message-Id: <1398685276-4610-17-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 16/17] 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=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_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