drivers: timer: Export sys_clock_cycle_get_64() implementations

Export sys_clock_cycle_get_64() implementations to enable k_cycle_get_64()
calls from llext libraries.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
This commit is contained in:
Jyri Sarha 2024-11-08 13:17:26 +02:00 committed by Benjamin Cabé
commit ff5a4581b2
2 changed files with 14 additions and 0 deletions

View file

@ -2,6 +2,7 @@
zephyr_library()
zephyr_library_sources(sys_clock_init.c)
zephyr_library_sources_ifdef(CONFIG_LLEXT export.c)
zephyr_library_sources_ifdef(CONFIG_ALTERA_AVALON_TIMER altera_avalon_timer_hal.c)
zephyr_library_sources_ifdef(CONFIG_AMBIQ_STIMER_TIMER ambiq_stimer.c)
zephyr_library_sources_ifdef(CONFIG_APIC_TIMER apic_timer.c)

13
drivers/timer/export.c Normal file
View file

@ -0,0 +1,13 @@
/*
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/llext/symbol.h>
#include <limits.h>
#ifdef CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER
EXPORT_SYMBOL(sys_clock_cycle_get_64);
#endif