aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2020-10-28 13:41:13 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2020-11-03 10:59:54 +0200
commit9f3ddcf2dc1dbf5c6e86c0712fcb52ea5aabe19f (patch)
tree7bfb6f60ac50ae852088be828b4a1cbf8090218d /include
parent50fc35f96c6c66e91d34ff961d896241196f501b (diff)
api: std_types: add unaligned integer types
Unaligned types are needed e.g. when pointing to field of a packed structure (like protocol headers). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/std_types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h
index 45753e819..6e2617b4e 100644
--- a/include/odp/api/spec/std_types.h
+++ b/include/odp/api/spec/std_types.h
@@ -16,6 +16,7 @@
#include <odp/visibility_begin.h>
/* uint64_t, uint32_t, etc */
#include <stdint.h>
+#include <odp/api/align.h>
#ifdef __cplusplus
extern "C" {
@@ -40,6 +41,15 @@ extern "C" {
*/
typedef uint32_t odp_percent_t;
+/** Unaligned uint16_t type */
+typedef uint16_t odp_una_u16_t ODP_ALIGNED(1);
+
+/** Unaligned uint32_t type */
+typedef uint32_t odp_una_u32_t ODP_ALIGNED(1);
+
+/** Unaligned uint64_t type */
+typedef uint64_t odp_una_u64_t ODP_ALIGNED(1);
+
/**
* @}
*/