From patchwork Mon Apr 28 11:41:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29213 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DDADF20553 for ; Mon, 28 Apr 2014 11:42:04 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rp18sf1451597iec.1 for ; Mon, 28 Apr 2014 04:42: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=/Px+HuSrW5hzNLHeTu6oc/oiGuIbtRSnRqlv4p/I5W8=; b=E68M3cZP5S5Vnup5V8OhGmWfz+jYP9HqcOYdDRPDxqV0Y6CEXsHeYAaz42mZgN8U0o y+AxoLdgDqvNsucRGfOkm4VaZcLvowg1d9TWohA6Eis6k62fEb5B3xkEFTXGXMPcP9DF bvM476iO34j9jWvZU91wOZ9Zw+h0kw7+2RH0iVeV8CZEg3z8PnaqxkFasBzNgItidzt4 WSfXyOqVr5ZnVVzk77R38cX6AeOLEVNuVA4vgEuUiSMdTLLOaF+bwOf4b9Sb+NA6QPEy NDXJnMNOzSemBzgqXXd1516RhiOT6eT6NQ0ivHqJ9o/xjsPYOUXpJHHk9UQ7tPT0yXMW XVfw== X-Gm-Message-State: ALoCoQl4A5ZEAG5vahLOgjgp5kEV1iFPghUDtrmWizrYptFjlYV5OGQQfcRl1RPn06YIar+X/v2T X-Received: by 10.182.79.41 with SMTP id g9mr12730405obx.41.1398685324351; Mon, 28 Apr 2014 04:42:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.229 with SMTP id o92ls2410755qge.95.gmail; Mon, 28 Apr 2014 04:42:04 -0700 (PDT) X-Received: by 10.58.220.161 with SMTP id px1mr24022788vec.13.1398685324221; Mon, 28 Apr 2014 04:42:04 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id j20si3552630vcx.127.2014.04.28.04.42.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42: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.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so8141457vcb.30 for ; Mon, 28 Apr 2014 04:42:04 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr23302506vcx.4.1398685324144; Mon, 28 Apr 2014 04:42: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 ib8csp110799vcb; Mon, 28 Apr 2014 04:42:03 -0700 (PDT) X-Received: by 10.229.65.138 with SMTP id j10mr32217877qci.10.1398685323732; Mon, 28 Apr 2014 04:42:03 -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 f7si7661603qge.198.2014.04.28.04.42.03 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:42:03 -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 1WejwE-0002o1-Ok; Mon, 28 Apr 2014 11:41:34 +0000 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wejvp-0002lM-Mn for lng-odp@lists.linaro.org; Mon, 28 Apr 2014 11:41:09 +0000 Received: by mail-lb0-f170.google.com with SMTP id s7so4898664lbd.15 for ; Mon, 28 Apr 2014 04:41:31 -0700 (PDT) X-Received: by 10.112.147.36 with SMTP id th4mr1891144lbb.32.1398685291829; Mon, 28 Apr 2014 04:41:31 -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.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:41:31 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Mon, 28 Apr 2014 14:41:03 +0300 Message-Id: <1398685276-4610-5-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 04/17] Split out platform-specific part of odp_barrier.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_barrier.h | 16 ++---------- platform/linux-generic/include/plat/odp_barrier.h | 28 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_barrier.h diff --git a/include/odp_barrier.h b/include/odp_barrier.h index 4547a26..fcd8575 100644 --- a/include/odp_barrier.h +++ b/include/odp_barrier.h @@ -20,16 +20,12 @@ extern "C" { #include -#include - +#include /** * ODP execution barrier */ -typedef struct odp_barrier_t { - int count; /**< @private Thread count */ - odp_atomic_int_t bar; /**< @private Barrier counter */ -} odp_barrier_t; +typedef plat_odp_barrier_t odp_barrier_t; /** @@ -48,16 +44,8 @@ void odp_barrier_init_count(odp_barrier_t *barrier, int count); */ void odp_barrier_sync(odp_barrier_t *barrier); - #ifdef __cplusplus } #endif #endif - - - - - - - diff --git a/platform/linux-generic/include/plat/odp_barrier.h b/platform/linux-generic/include/plat/odp_barrier.h new file mode 100644 index 0000000..f976ef5 --- /dev/null +++ b/platform/linux-generic/include/plat/odp_barrier.h @@ -0,0 +1,28 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP execution barriers + */ + +#ifndef ODP_BARRIER_H_ +#error This file should be included only into corresponding top level header +#else + +#include + +/** + * ODP execution barrier + */ +typedef struct odp_barrier_t { + int count; /**< @private Thread count */ + odp_atomic_int_t bar; /**< @private Barrier counter */ +} plat_odp_barrier_t; + +#endif