103 void (*callback)(
void *arg);
118#if MODULE_PM_LAYERED || DOXYGEN
296#define MSG_ZTIMER64 0xc83f
MAYBE_INLINE void irq_restore(unsigned state)
This function restores the IRQ disable bit in the status register to the value contained within passe...
MAYBE_INLINE unsigned irq_disable(void)
This function sets the IRQ disable bit in the status register.
int16_t kernel_pid_t
Unique process identifier.
void ztimer64_init(void)
Initialize the board-specific default ztimer configuration.
void ztimer64_set_wakeup_at(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t target, kernel_pid_t pid)
Set a timer that wakes up a thread (absolute version)
void ztimer64_clock_init(ztimer64_clock_t *clock, ztimer_clock_t *base_clock)
Initialize clock to be run from base_clock.
unsigned ztimer64_is_set(const ztimer64_t *timer)
Check if a timer is currently active.
static void ztimer64_set_wakeup(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t offset, kernel_pid_t pid)
Set a timer that wakes up a thread (relative version)
void ztimer64_remove(ztimer64_clock_t *clock, ztimer64_t *timer)
Remove a timer from a clock.
static void ztimer64_set_timeout_flag(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t timeout)
Set timeout thread flag after timeout.
int ztimer64_mutex_lock_until(ztimer64_clock_t *clock, mutex_t *mutex, uint64_t target)
Try to lock the given mutex, but give up at target time.
void ztimer64_sleep_until(ztimer64_clock_t *clock, uint64_t target)
Put the calling thread to sleep until the specified time.
void ztimer64_update_head_offset(ztimer64_clock_t *clock)
Update ztimer clock head list offset.
uint64_t ztimer64_now(ztimer64_clock_t *clock)
Get the current time from a clock.
static void ztimer64_set_msg(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t offset, msg_t *msg, kernel_pid_t target_pid)
Post a message after a delay (relative version)
static int ztimer64_msg_receive_timeout(ztimer64_clock_t *clock, msg_t *msg, uint64_t timeout)
receive a message (blocking, with relative timeout)
static int ztimer64_mutex_lock_timeout(ztimer64_clock_t *clock, mutex_t *mutex, uint64_t timeout)
Try to lock the given mutex, but give up after timeout.
static void ztimer64_set(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t offset)
Set a timer on a clock (relative version)
void ztimer64_periodic_wakeup(ztimer64_clock_t *clock, uint64_t *last_wakeup, uint64_t period)
Suspend the calling thread until the time (last_wakeup + period)
void ztimer64_set_timeout_flag_at(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t target)
Set timeout thread flag at target time.
static uint64_t ztimer64_offset2absolute(ztimer64_clock_t *clock, uint64_t offset)
Get absolute target time for a clock given offset.
void ztimer64_set_at(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t target)
Set a timer on a clock (absolute version)
static void ztimer64_sleep(ztimer64_clock_t *clock, uint64_t duration)
Put the calling thread to sleep for the specified number of ticks.
int ztimer64_msg_receive_until(ztimer64_clock_t *clock, msg_t *msg, uint64_t target)
receive a message (blocking, with absolute timeout)
static int ztimer64_rmutex_lock_timeout(ztimer64_clock_t *clock, rmutex_t *rmutex, uint64_t timeout)
Try to lock the given rmutex, but give up after timeout.
ztimer64_clock_t *const ZTIMER64_USEC
Default ztimer microsecond clock.
int64_t ztimer64_overhead(ztimer64_clock_t *clock, uint64_t base)
Measure ztimer64 overhead.
void ztimer64_set_msg_at(ztimer64_clock_t *clock, ztimer64_t *timer, uint64_t target, msg_t *msg, kernel_pid_t target_pid)
Post a message at a specified time.
ztimer64_clock_t *const ZTIMER64_MSEC
Default ztimer millisecond clock.
ztimer64_clock_t *const ZTIMER64_SEC
Default ztimer second clock.
static void ztimer64_spin_until(ztimer64_clock_t *clock, uint64_t target)
Busy-wait until specified target time.
int ztimer64_rmutex_lock_until(ztimer64_clock_t *clock, rmutex_t *rmutex, uint64_t target)
Try to lock the given rmutex, but give up at time.
Mutex for thread synchronization.
Describes a message object which can be sent between threads.
Minimum information for each timer.
ztimer64_base_t * next
next timer in list
uint64_t target
absolute target time
ztimer_t base_timer
32bit backend timer
uint16_t adjust_sleep
will be subtracted on every sleep(), in addition to adjust_set
uint8_t block_pm_mode
min.
uint64_t checkpoint
lower timer checkpoint offset
uint16_t adjust_set
will be subtracted on every set()
ztimer64_base_t * first
list of active timers
ztimer_clock_t * base_clock
32bit clock backend
ztimer64_base_t base
clock list entry
void * arg
timer callback argument