diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2014-02-19 11:00:51 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-02-24 12:44:50 +0400 |
commit | ab883023161072cf1d714337358926daeddd8d43 (patch) | |
tree | 1ef5f19f6cec26a16607ad10e41b37ad0771d717 /include | |
parent | 9d3e9afc66895a74d3d54a70fc3284bd11c169cd (diff) |
Buffer type added
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp_buffer.h | 15 | ||||
-rw-r--r-- | include/odp_buffer_pool.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/odp_buffer.h b/include/odp_buffer.h index 9f0811a9..d8e47798 100644 --- a/include/odp_buffer.h +++ b/include/odp_buffer.h @@ -53,6 +53,20 @@ void *odp_buffer_addr(odp_buffer_t buf); size_t odp_buffer_size(odp_buffer_t buf); /** + * Buffer type + * + * @param buf Buffer handle + * + * @return Buffer type + */ +int odp_buffer_type(odp_buffer_t buf); + +#define ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */ +#define ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */ +#define ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */ +#define ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */ + +/** * Tests if buffer is part of a scatter/gather list * * @param buf Buffer handle @@ -70,7 +84,6 @@ int odp_buffer_is_scatter(odp_buffer_t buf); */ int odp_buffer_is_valid(odp_buffer_t buf); - /** * Print buffer metadata to STDOUT * diff --git a/include/odp_buffer_pool.h b/include/odp_buffer_pool.h index 20fbf041..15f0be43 100644 --- a/include/odp_buffer_pool.h +++ b/include/odp_buffer_pool.h @@ -26,8 +26,6 @@ extern "C" { #define ODP_BUFFER_POOL_NAME_LEN 32 #define ODP_BUFFER_POOL_INVALID (0xffffffff) -#define ODP_BUFFER_TYPE_RAW 0 -#define ODP_BUFFER_TYPE_PACKET 1 typedef uint32_t odp_buffer_pool_t; |