diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-03-01 13:56:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-01 13:56:00 +0200 |
commit | 6c96e7253082bdc5b3a6a6f39a1ced8200a39ee0 (patch) | |
tree | 908bd33aff383744a8cc18e4f8374c22ed61c46c /platform/linux-dpdk/include/odp_timer_internal.h | |
parent | 09a1f287c7956b36db8b3320a45e10a22058c269 (diff) | |
parent | 4c9bd497c64a8dada64e205c57c6db7dddacb1ec (diff) |
Merge ODP v1.34.0.0v1.34.0.0_DPDK_19.11
Merge ODP linux-generic v1.34.0.0 into linux-dpdk.
Diffstat (limited to 'platform/linux-dpdk/include/odp_timer_internal.h')
-rw-r--r-- | platform/linux-dpdk/include/odp_timer_internal.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/platform/linux-dpdk/include/odp_timer_internal.h b/platform/linux-dpdk/include/odp_timer_internal.h new file mode 100644 index 000000000..2e8487689 --- /dev/null +++ b/platform/linux-dpdk/include/odp_timer_internal.h @@ -0,0 +1,54 @@ +/* Copyright (c) 2014-2018, Linaro Limited + * Copyright (c) 2021-2022, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP timeout descriptor - implementation internal + */ + +#ifndef ODP_TIMER_INTERNAL_H_ +#define ODP_TIMER_INTERNAL_H_ + +#include <odp/api/align.h> +#include <odp/api/debug.h> +#include <odp/api/timer.h> + +#include <odp_event_internal.h> +#include <odp_global_data.h> +#include <odp_pool_internal.h> + +/** + * Internal Timeout header + */ +typedef struct ODP_ALIGNED_CACHE odp_timeout_hdr_t { + /* Common event header */ + _odp_event_hdr_t event_hdr; + + /* Requested expiration time */ + uint64_t expiration; + + /* User ptr inherited from parent timer */ + const void *user_ptr; + + /* Parent timer */ + odp_timer_t timer; + +} odp_timeout_hdr_t; + +/* A larger decrement value should be used after receiving events compared to + * an 'empty' call. */ +void _odp_timer_run_inline(int dec); + +/* Static inline wrapper to minimize modification of schedulers. */ +static inline void timer_run(int dec) +{ + if (odp_global_rw->inline_timers) + _odp_timer_run_inline(dec); +} + +#endif |