From patchwork Mon Feb 2 18:52:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44172 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B5AD3202A5 for ; Mon, 2 Feb 2015 18:53:21 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id h11sf21809321wiw.1 for ; Mon, 02 Feb 2015 10:53:21 -0800 (PST) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=WKHNHBYtF0drBtXve3CjkrFlD6/2plijyUSNNKuZRx4=; b=bc9qJhCWYy3ij47BM6RgDPtIMScu6/IXC/9T4+kcCbxhnkP7Iv1MAysYL+MyuRzrqC WAXbnphDH93cjZMyP1VYMX+nicIm/GKIQ9DWF8zH3KRUkQtGZHJ0BipXnkck8NPKQ35k RDPnbj8YKP2MDMZOO24bPsnmKSLkEZGBEpNwHZC39rtZ2apabF0mLvMpIhFi69+b2bA/ 0TBiQOSTgGDl9w1bZZZJ2vxoNNNOvBFlJvc0xAx2lpyVH2ye+f61Xj8HKLE5Up1tS+6m LBxpAQfHUqanLiR7ZoFK591b7FthOrjt+ttd91n34ZjvgIV5lhjsHIGZWsN8JHo46Mrr tWJg== X-Gm-Message-State: ALoCoQlVlQ9H50VKctH3n17YQfbG+qCd9ajC8lnSWwXXxSgCOk3sK3RBCsGJsE3Pe4HYIQCUfEt9 X-Received: by 10.152.243.3 with SMTP id wu3mr925244lac.6.1422903200752; Mon, 02 Feb 2015 10:53:20 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.234 with SMTP id bb10ls663239lab.90.gmail; Mon, 02 Feb 2015 10:53:20 -0800 (PST) X-Received: by 10.112.142.201 with SMTP id ry9mr21292881lbb.4.1422903200535; Mon, 02 Feb 2015 10:53:20 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id 4si836653lal.36.2015.02.02.10.53.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 10:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gm9so44176141lab.0 for ; Mon, 02 Feb 2015 10:53:20 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr21231711lbl.25.1422903200044; Mon, 02 Feb 2015 10:53:20 -0800 (PST) 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.112.35.133 with SMTP id h5csp1479742lbj; Mon, 2 Feb 2015 10:53:19 -0800 (PST) X-Received: by 10.229.216.71 with SMTP id hh7mr2958209qcb.0.1422903198243; Mon, 02 Feb 2015 10:53:18 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m20si26040342qgd.65.2015.02.02.10.53.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 10:53:18 -0800 (PST) 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-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIM7V-0003CC-NN; Mon, 02 Feb 2015 18:53:13 +0000 Received: from mail-la0-f45.google.com ([209.85.215.45]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIM7P-0003C4-I1 for lng-odp@lists.linaro.org; Mon, 02 Feb 2015 18:53:07 +0000 Received: by mail-la0-f45.google.com with SMTP id gd6so43947412lab.4 for ; Mon, 02 Feb 2015 10:53:01 -0800 (PST) X-Received: by 10.112.129.195 with SMTP id ny3mr21403864lbb.10.1422903181151; Mon, 02 Feb 2015 10:53:01 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id uh6sm4568708lac.5.2015.02.02.10.53.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Feb 2015 10:53:00 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Mon, 2 Feb 2015 19:52:56 +0100 Message-Id: <1422903176-13535-1-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: timers patch Subject: [lng-odp] [PATCH] api: odp_timer.h: move definitions to plat/timer_types.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: ola.liljedahl@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.215.41 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 Move the platform specific definitions for timer pool, timer and timeout to the platform's include/odp/plat/timer_types.h file. Signed-off-by: Ola Liljedahl Reviewed-by: Bill Fischofer --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/timer.h | 32 +++++++-------- .../linux-generic/include/odp/plat/timer_types.h | 48 ++++++++++++++++++++++ platform/linux-generic/include/odp/timer.h | 1 + 3 files changed, 64 insertions(+), 17 deletions(-) create mode 100644 platform/linux-generic/include/odp/plat/timer_types.h diff --git a/include/odp/api/timer.h b/include/odp/api/timer.h index 1b813da..b5435c3 100644 --- a/include/odp/api/timer.h +++ b/include/odp/api/timer.h @@ -22,17 +22,15 @@ extern "C" { * @{ */ -struct odp_timer_pool_s; /**< Forward declaration */ - /** -* ODP timer pool handle (platform dependent) -*/ -typedef struct odp_timer_pool_s *odp_timer_pool_t; + * @typedef odp_timer_pool_t + * ODP timer pool handle + */ /** - * Invalid timer pool handle (platform dependent). + * @def ODP_TIMER_POOL_INVALID + * Invalid timer pool handle */ -#define ODP_TIMER_POOL_INVALID NULL /** * Clock sources for timers in timer pool. @@ -46,24 +44,24 @@ typedef enum { } odp_timer_clk_src_t; /** -* ODP timer handle (platform dependent). -*/ -typedef uint32_t odp_timer_t; + * @typedef odp_timer_t + * ODP timer handle + */ /** -* ODP timeout handle (platform dependent). -*/ -typedef void *odp_timeout_t; + * @def ODP_TIMER_INVALID + * Invalid timer handle + */ /** - * Invalid timer handle (platform dependent). + * @typedef odp_timeout_t + * ODP timeout handle */ -#define ODP_TIMER_INVALID ((uint32_t)~0U) /** - * Invalid timeout handle (platform dependent). + * @def ODP_TIMEOUT_INVALID + * Invalid timeout handle */ -#define ODP_TIMEOUT_INVALID NULL /** * Return values of timer set calls. diff --git a/platform/linux-generic/include/odp/plat/timer_types.h b/platform/linux-generic/include/odp/plat/timer_types.h new file mode 100644 index 0000000..c21a667 --- /dev/null +++ b/platform/linux-generic/include/odp/plat/timer_types.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2013, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP timer service + */ + +#ifndef ODP_TIMER_TYPES_H_ +#define ODP_TIMER_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup odp_packet ODP TIMER + * Operations on a timer. + * @{ + **/ + +struct odp_timer_pool_s; /**< Forward declaration */ + +typedef struct odp_timer_pool_s *odp_timer_pool_t; + +#define ODP_TIMER_POOL_INVALID NULL + +typedef uint32_t odp_timer_t; + +#define ODP_TIMER_INVALID ((uint32_t)~0U) + +typedef void *odp_timeout_t; + +#define ODP_TIMEOUT_INVALID NULL + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp/timer.h b/platform/linux-generic/include/odp/timer.h index df071f2..eb9a3a2 100644 --- a/platform/linux-generic/include/odp/timer.h +++ b/platform/linux-generic/include/odp/timer.h @@ -22,6 +22,7 @@ extern "C" { #include #include #include +#include /** @ingroup odp_timer * @{