Skip to content

Commit

Permalink
drivers: timer: Export sys_clock_cycle_get_64() implementations
Browse files Browse the repository at this point in the history
Export sys_clock_cycle_get_64() implementations to enable k_cycle_get_64()
calls from llext libraries.

Signed-off-by: Jyri Sarha <[email protected]>
  • Loading branch information
Jyri Sarha authored and kartben committed Dec 6, 2024
1 parent 42ad39b commit ff5a458
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/timer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions drivers/timer/export.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ff5a458

Please sign in to comment.