@@ -25,6 +25,7 @@ odpinclude_HEADERS = \
$(srcdir)/include/odp/buffer.h \
$(srcdir)/include/odp/buffer_pool.h \
$(srcdir)/include/odp/crypto.h \
+ $(srcdir)/include/odp/event.h \
$(srcdir)/include/odp/packet_io.h \
$(srcdir)/include/odp/packet.h \
$(linux_generic_srcdir)/include/odp/align.h \
@@ -37,7 +38,6 @@ odpinclude_HEADERS = \
$(linux_generic_srcdir)/include/odp/cpumask.h \
$(linux_generic_srcdir)/include/odp/debug.h \
$(linux_generic_srcdir)/include/odp/errno.h \
- $(linux_generic_srcdir)/include/odp/event.h \
$(linux_generic_srcdir)/include/odp/hints.h \
$(linux_generic_srcdir)/include/odp/init.h \
$(linux_generic_srcdir)/include/odp/random.h \
@@ -60,6 +60,7 @@ odpplatincludedir = $(includedir)/odp/plat
odpplatinclude_HEADERS = \
$(srcdir)/include/odp/plat/align.h \
$(srcdir)/include/odp/plat/debug.h \
+ $(srcdir)/include/odp/plat/event_types.h \
$(srcdir)/include/odp/plat/mcsdk_tune.h \
$(srcdir)/include/odp/plat/osal.h \
$(srcdir)/include/odp/plat/state.h \
@@ -70,7 +71,6 @@ odpplatinclude_HEADERS = \
$(linux_generic_srcdir)/include/odp/plat/classification_types.h \
$(linux_generic_srcdir)/include/odp/plat/cpumask_types.h \
$(linux_generic_srcdir)/include/odp/plat/crypto_types.h \
- $(linux_generic_srcdir)/include/odp/plat/event_types.h \
$(linux_generic_srcdir)/include/odp/plat/packet_types.h \
$(linux_generic_srcdir)/include/odp/plat/packet_io_types.h \
$(linux_generic_srcdir)/include/odp/plat/pool_types.h \
new file mode 100644
@@ -0,0 +1,67 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP event
+ */
+
+#ifndef ODP_EVENT_H_
+#define ODP_EVENT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/plat/event_types.h>
+#include <odp/plat/osal.h>
+
+/**
+ * @internal Convert ODP event to CPPI descriptor
+ *
+ * @param ev Event handle
+ *
+ * @return CPPI descriptor
+ */
+static inline Cppi_HostDesc *_odp_ev_to_cppi_desc(odp_event_t ev)
+{
+ return (Cppi_HostDesc *)(uintptr_t)ev;
+}
+
+/**
+ * @internal Convert CPPI descriptor to ODP event
+ *
+ * @param desc CPPI descriptor pointer
+ *
+ * @return ODP event handle
+ */
+static inline odp_event_t _cppi_desc_to_odp_ev(Cppi_HostDesc *desc)
+{
+ return (odp_event_t)desc;
+}
+
+/** @ingroup odp_event
+ * @{
+ */
+
+static inline int odp_event_type(odp_event_t ev)
+{
+ Cppi_HostDesc *desc = _odp_ev_to_cppi_desc(ev);
+ return _cppi_desc_pkt_type(desc);
+}
+
+/**
+ * @}
+ */
+
+#include <odp/api/event.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
new file mode 100644
@@ -0,0 +1,44 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP event types
+ */
+
+#ifndef ODP_PLAT_EVENT_TYPES_H_
+#define ODP_PLAT_EVENT_TYPES_H_
+
+#include <odp/std_types.h>
+#include <odp/plat/strong_types.h>
+
+/** @defgroup odp_event ODP EVENT
+ * Operations on an event.
+ * @{
+ */
+
+typedef odp_handle_t odp_event_t;
+
+#define ODP_EVENT_INVALID ((odp_event_t)0)
+
+#define ODP_EVENT_BUFFER 1
+#define ODP_EVENT_PACKET 2
+#define ODP_EVENT_TIMEOUT 3
+#define ODP_EVENT_CRYPTO_COMPL 4
+
+/** Get printable format of odp_event_t */
+static inline uint64_t odp_event_to_u64(odp_event_t hdl)
+{
+ return _odp_pri(hdl);
+}
+
+/**
+ * @}
+ */
+
+#endif