37#ifndef _RTEMS_SCORE_TIMECOUNTER_H
38#define _RTEMS_SCORE_TIMECOUNTER_H
65void _Timecounter_Bintime(
struct bintime *bt );
72void _Timecounter_Nanotime(
struct timespec *ts );
79void _Timecounter_Microtime(
struct timeval *tv );
86void _Timecounter_Binuptime(
struct bintime *bt );
100void _Timecounter_Nanouptime(
struct timespec *ts );
107void _Timecounter_Microuptime(
struct timeval *tv );
117void _Timecounter_Getbintime(
struct bintime *bt );
129void _Timecounter_Getnanotime(
struct timespec *ts );
141void _Timecounter_Getmicrotime(
struct timeval *tv );
151void _Timecounter_Getbinuptime(
struct bintime *bt );
161void _Timecounter_Getnanouptime(
struct timespec *ts );
171void _Timecounter_Getmicrouptime(
struct timeval *tv );
178void _Timecounter_Getboottime(
struct timeval *tv );
185void _Timecounter_Getboottimebin(
struct bintime *bt );
203#if ISR_LOCK_NEEDS_OBJECT
207extern ISR_lock_Control _Timecounter_Lock;
217#define _Timecounter_Acquire( lock_context ) \
218 _ISR_lock_ISR_disable_and_acquire( &_Timecounter_Lock, lock_context )
227#define _Timecounter_Release(lock_context) \
228 _ISR_lock_Release_and_ISR_enable(&_Timecounter_Lock, lock_context)
251extern volatile time_t _Timecounter_Time_second;
259extern volatile int32_t _Timecounter_Time_uptime;
This header file provides timecounter definitions for the kernel space (_KERNEL is defined before inc...
void _Timecounter_NTP_update_second(int64_t *adjustment, time_t *newsec)
Updates the time adjustment and seconds according to the NTP state.
void _Timecounter_Tick(void)
Performs a timecounter tick.
int64_t _Timecounter_Sbinuptime(void)
Returns the uptime in the sbintime_t format.
void(*) Timecounter_NTP_update_second(int64_t *adjustment, time_t *newsec)
Handler doing the NTP update second processing shall have this type.
Definition timecounter.h:273
void _Timecounter_Tick_simple(uint32_t delta, uint32_t offset, ISR_lock_Context *lock_context)
Performs a simple timecounter tick.
uint64_t _Timecounter_Get_frequency(void)
Gets the frequency in Hz of the current timecounter at some time point during the call.
void _Timecounter_Discipline(struct timespec *tsp, long nsec)
Updates the timecounter frequency adjustment used by _Timecounter_Set_NTP_update_second().
void _Timecounter_Install(struct timecounter *tc)
Installs the timecounter.
void _Timecounter_Set_NTP_update_second(Timecounter_NTP_update_second handler)
Sets the NTP update second handler.
struct timecounter * _Timecounter
The current timecounter.
This header file provides the interfaces of the ISR Locks.
Local ISR lock context for acquire and release pairs.
Definition isrlock.h:94
This header file provides interfaces of the timecounter implementation.