@@ -69,6 +69,18 @@ extern "C" {
*/
int odp_event_type(odp_event_t event);
+/**
+ * Get printable value for an odp_event_t
+ *
+ * @param hdl odp_event_t handle to be printed
+ * @return uint64_t value that can be used to print/display this
+ * handle
+ *
+ * @note This routine is intended to be used for diagnostic purposes
+ * to enable applications to generate a printable value that represents
+ * an odp_event_t handle.
+ */
+uint64_t odp_event_t_print(odp_event_t hdl);
/**
* @}
@@ -18,17 +18,17 @@
extern "C" {
#endif
-
-#include <odp/plat/buffer_types.h>
+#include <odp/std_types.h>
+#include <odp/plat/strong_types.h>
/** @defgroup odp_event ODP EVENT
* Operations on an event.
* @{
*/
-typedef odp_buffer_t odp_event_t;
+typedef odp_handle_t odp_event_t;
-#define ODP_EVENT_INVALID ODP_BUFFER_INVALID
+#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff)
#define ODP_EVENT_TYPE_INVALID (-1)
#define ODP_EVENT_BUFFER 1
@@ -36,6 +36,12 @@ typedef odp_buffer_t odp_event_t;
#define ODP_EVENT_TIMEOUT 3
#define ODP_EVENT_CRYPTO_COMPL 4
+/** Get printable format of odp_event_t */
+static inline uint64_t odp_event_t_print(odp_event_t hdl)
+{
+ return _odp_pri(hdl);
+}
+
/**
* @}
*/
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- include/odp/api/event.h | 12 ++++++++++++ platform/linux-generic/include/odp/plat/event_types.h | 14 ++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-)