diff mbox

[RFC,17/17] Split out platform-specific part of odp_timer.h

Message ID 1398685276-4610-18-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk April 28, 2014, 11:41 a.m. UTC
---
 include/odp_timer.h                             |   10 +++---
 platform/linux-generic/include/plat/odp_timer.h |   39 +++++++++++++++++++++++
 2 files changed, 44 insertions(+), 5 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_timer.h
diff mbox

Patch

diff --git a/include/odp_timer.h b/include/odp_timer.h
index 80babd1..417bf4a 100644
--- a/include/odp_timer.h
+++ b/include/odp_timer.h
@@ -22,24 +22,24 @@  extern "C" {
 #include <odp_buffer.h>
 #include <odp_buffer_pool.h>
 #include <odp_queue.h>
-
+#include <plat/odp_timer.h>
 
 /**
 * ODP timer handle
 */
-typedef uint32_t odp_timer_t;
+typedef plat_odp_timer_t odp_timer_t;
 
 /** Invalid timer */
-#define ODP_TIMER_INVALID 0
+#define ODP_TIMER_INVALID PLAT_ODP_TIMER_INVALID
 
 
 /**
 * ODP timeout handle
 */
-typedef odp_buffer_t odp_timer_tmo_t;
+typedef plat_odp_timer_tmo_t odp_timer_tmo_t;
 
 /** Invalid timeout */
-#define ODP_TIMER_TMO_INVALID 0
+#define ODP_TIMER_TMO_INVALID PLAT_ODP_TIMER_TMO_INVALID
 
 
 /**
diff --git a/platform/linux-generic/include/plat/odp_timer.h b/platform/linux-generic/include/plat/odp_timer.h
new file mode 100644
index 0000000..072608c
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_timer.h
@@ -0,0 +1,39 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP timer
+ */
+
+#ifndef ODP_TIMER_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_std_types.h>
+#include <odp_buffer.h>
+
+
+/**
+* ODP timer handle
+*/
+typedef uint32_t plat_odp_timer_t;
+
+/** Invalid timer */
+#define PLAT_ODP_TIMER_INVALID 0
+
+
+/**
+* ODP timeout handle
+*/
+typedef odp_buffer_t plat_odp_timer_tmo_t;
+
+/** Invalid timeout */
+#define PLAT_ODP_TIMER_TMO_INVALID 0
+
+#endif