diff options
author | Bill Fischofer <bill.fischofer@linaro.org> | 2015-07-04 18:12:01 -0500 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-07-07 18:38:32 +0300 |
commit | 51bff87c87afb41555ce2e42f8ed9f561e7eeffe (patch) | |
tree | 6d81cbe675d468e0a23c47e48d6fe140dae2fa7b /platform/linux-generic | |
parent | c210694ccc5a460b43e101236e0360b684377e1e (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')
-rw-r--r-- | platform/linux-generic/include/odp/plat/event_types.h | 13 | ||||
-rw-r--r-- | platform/linux-generic/include/odp_buffer_inlines.h | 2 | ||||
-rw-r--r-- | platform/linux-generic/include/odp_buffer_internal.h | 2 | ||||
-rw-r--r-- | platform/linux-generic/odp_event.c | 2 |
4 files changed, 12 insertions, 7 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 */ diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c index c50103cfb..30dde56a3 100644 --- a/platform/linux-generic/odp_event.c +++ b/platform/linux-generic/odp_event.c @@ -14,7 +14,7 @@ #include <odp_buffer_inlines.h> #include <odp_debug_internal.h> -int odp_event_type(odp_event_t event) +odp_event_type_t odp_event_type(odp_event_t event) { return _odp_buffer_event_type(odp_buffer_from_event(event)); } |