15#ifndef ZEPHYR_INCLUDE_DRIVERS_SYSTEM_TIMER_H_
16#define ZEPHYR_INCLUDE_DRIVERS_SYSTEM_TIMER_H_
26#define SYS_CLOCK_MAX_WAIT (IS_ENABLED(CONFIG_SYSTEM_CLOCK_SLOPPY_IDLE) \
27 ? K_TICKS_FOREVER : INT_MAX)
70#if defined(CONFIG_SMP) || defined(CONFIG_SPIN_VALIDATE)
103#if defined(CONFIG_SMP) || defined(CONFIG_SPIN_VALIDATE)
274#if defined(CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE) || defined(__DOXYGEN__)
302void z_sys_clock_hw_cycles_per_sec_update(
uint32_t new_hz);
static ALWAYS_INLINE unsigned int arch_irq_lock(void)
Disable all interrupts on the local CPU.
Definition irq.h:168
static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
Definition irq.h:176
uint64_t sys_clock_cycle_get_64(void)
64 bit hardware cycle counter
uint32_t sys_clock_cycle_get_32(void)
Hardware cycle counter.
void sys_clock_disable(void)
Disable system timer.
void sys_clock_idle_exit(void)
Timer idle exit notification.
void sys_clock_set_timeout(int32_t ticks, bool idle)
Set system clock timeout.
void sys_clock_announce_locked(int32_t ticks, k_spinlock_key_t key)
Announce time progress to the kernel.
static void sys_clock_announce(int32_t ticks)
Announce time progress to the kernel (legacy wrapper).
Definition system_timer.h:205
uint32_t sys_clock_elapsed(void)
Ticks elapsed since last sys_clock_announce() call.
k_spinlock_key_t sys_clock_lock(void)
Lock the system clock.
void sys_clock_unlock(k_spinlock_key_t key)
Unlock the system clock.
struct z_spinlock_key k_spinlock_key_t
Spinlock key type.
Definition spinlock.h:126
Public interface for spinlocks.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
Kernel Spin Lock.
Definition spinlock.h:45