From 875d5bb720580f4695818dfc53e2bc38e215159e Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Fri, 9 Jun 2023 13:31:42 +0300 Subject: api: time: split header files Split time API into separate header files for functions and types. This makes inlining API function implementations easier. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- include/odp/api/abi-default/time_types.h | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 include/odp/api/abi-default/time_types.h (limited to 'include/odp/api/abi-default/time_types.h') diff --git a/include/odp/api/abi-default/time_types.h b/include/odp/api/abi-default/time_types.h new file mode 100644 index 000000000..4b7ec47eb --- /dev/null +++ b/include/odp/api/abi-default/time_types.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2015-2018, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_ABI_TIME_TYPES_H_ +#define ODP_ABI_TIME_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** @ingroup odp_time + * @{ + **/ + +/** + * @internal Time structure used for both POSIX timespec and HW counter + * implementations. + */ +typedef struct odp_time_t { + /** @internal Variant mappings for time type */ + union { + /** @internal Used with generic 64 bit operations */ + uint64_t u64; + + /** @internal Nanoseconds */ + uint64_t nsec; + + /** @internal HW timer counter value */ + uint64_t count; + + }; +} odp_time_t; + +#define ODP_TIME_NULL ((odp_time_t){.u64 = 0}) + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3