aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2015-07-04 18:12:01 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-07 18:38:32 +0300
commit51bff87c87afb41555ce2e42f8ed9f561e7eeffe (patch)
tree6d81cbe675d468e0a23c47e48d6fe140dae2fa7b /platform/linux-generic/include
parentc210694ccc5a460b43e101236e0360b684377e1e (diff)
api: event: change to odp_event_type_t
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include')
-rw-r--r--platform/linux-generic/include/odp/plat/event_types.h13
-rw-r--r--platform/linux-generic/include/odp_buffer_inlines.h2
-rw-r--r--platform/linux-generic/include/odp_buffer_internal.h2
3 files changed, 11 insertions, 6 deletions
diff --git a/platform/linux-generic/include/odp/plat/event_types.h b/platform/linux-generic/include/odp/plat/event_types.h
index d91937d2e..06b15cdfe 100644
--- a/platform/linux-generic/include/odp/plat/event_types.h
+++ b/platform/linux-generic/include/odp/plat/event_types.h
@@ -30,10 +30,15 @@ typedef ODP_HANDLE_T(odp_event_t);
#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff)
-#define ODP_EVENT_BUFFER 1
-#define ODP_EVENT_PACKET 2
-#define ODP_EVENT_TIMEOUT 3
-#define ODP_EVENT_CRYPTO_COMPL 4
+/**
+ * Event types
+ */
+typedef enum odp_event_type_t {
+ ODP_EVENT_BUFFER = 1,
+ ODP_EVENT_PACKET = 2,
+ ODP_EVENT_TIMEOUT = 3,
+ ODP_EVENT_CRYPTO_COMPL = 4,
+} odp_event_type_t;
/** Get printable format of odp_event_t */
static inline uint64_t odp_event_to_u64(odp_event_t hdl)
diff --git a/platform/linux-generic/include/odp_buffer_inlines.h b/platform/linux-generic/include/odp_buffer_inlines.h
index 74af38b9c..18d1a2ea5 100644
--- a/platform/linux-generic/include/odp_buffer_inlines.h
+++ b/platform/linux-generic/include/odp_buffer_inlines.h
@@ -190,7 +190,7 @@ static inline void *segment_map(odp_buffer_hdr_t *buf,
return (void *)seg_addr;
}
-static inline int _odp_buffer_event_type(odp_buffer_t buf)
+static inline odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf)
{
return odp_buf_to_hdr(buf)->event_type;
}
diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h
index ef116c3de..d9ffc0678 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -117,7 +117,7 @@ typedef struct odp_buffer_hdr_t {
} flags;
int16_t allocator; /* allocating thread id */
int8_t type; /* buffer type */
- int8_t event_type; /* for reuse as event */
+ odp_event_type_t event_type; /* for reuse as event */
uint32_t size; /* max data size */
odp_atomic_u32_t ref_count; /* reference count */
odp_pool_t pool_hdl; /* buffer pool handle */