RTEMS CPU Kit with SuperCore  4.11.3
Data Structures | Macros | Functions | Variables
kern_tc.c File Reference
#include <sys/cdefs.h>
#include "opt_compat.h"
#include "opt_ntp.h"
#include "opt_ffclock.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/timeffc.h>
#include <sys/timepps.h>
#include <sys/timetc.h>
#include <sys/timex.h>
#include <sys/vdso.h>
#include <machine/atomic.h>
Include dependency graph for kern_tc.c:

Data Structures

struct  timehands
 

Macros

#define LARGE_STEP   200
 

Functions

 __FBSDID ("$FreeBSD r284178 2015-06-09T11:49:56Z$")
 
 SYSCTL_PROC (_kern, KERN_BOOTTIME, boottime, CTLTYPE_STRUCT|CTLFLAG_RD, NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime")
 
 SYSCTL_NODE (_kern, OID_AUTO, timecounter, CTLFLAG_RW, 0, "")
 
 SYSCTL_INT (_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, &timestepwarnings, 0, "Log time steps")
 
 SYSCTL_PROC (_kern_timecounter, OID_AUTO, alloweddeviation, CTLTYPE_INT|CTLFLAG_RWTUN|CTLFLAG_MPSAFE, 0, 0, sysctl_kern_timecounter_adjprecision, "I", "Allowed time interval deviation in percents")
 
void dtrace_getnanotime (struct timespec *tsp)
 
void binuptime (struct bintime *bt)
 
void nanouptime (struct timespec *tsp)
 
void microuptime (struct timeval *tvp)
 
void bintime (struct bintime *bt)
 
void nanotime (struct timespec *tsp)
 
void microtime (struct timeval *tvp)
 
void getbinuptime (struct bintime *bt)
 
void getnanouptime (struct timespec *tsp)
 
void getmicrouptime (struct timeval *tvp)
 
void getbintime (struct bintime *bt)
 
void getnanotime (struct timespec *tsp)
 
void getmicrotime (struct timeval *tvp)
 
void sysclock_getsnapshot (struct sysclock_snap *clock_snap, int fast)
 
int sysclock_snap2bintime (struct sysclock_snap *cs, struct bintime *bt, int whichclock, uint32_t flags)
 
void tc_init (struct timecounter *tc)
 
uint64_t tc_getfrequency (void)
 
void tc_setclock (struct timespec *ts)
 
 SYSCTL_PROC (_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING|CTLFLAG_RW, 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected")
 
 SYSCTL_PROC (_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING|CTLFLAG_RD, 0, 0, sysctl_kern_timecounter_choice, "A", "Timecounter hardware detected")
 
int pps_ioctl (u_long cmd, caddr_t data, struct pps_state *pps)
 
void pps_init (struct pps_state *pps)
 
void pps_init_abi (struct pps_state *pps)
 
void pps_capture (struct pps_state *pps)
 
void pps_event (struct pps_state *pps, int event)
 
 SYSCTL_INT (_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond")
 
void tc_ticktock (int cnt)
 
 SYSINIT (timecounter, SI_SUB_CLOCKS, SI_ORDER_SECOND, inittimecounter, NULL)
 
void cpu_tick_calibration (void)
 
void set_cputicker (cpu_tick_f *func, uint64_t freq, unsigned var)
 
uint64_t cpu_tickrate (void)
 
uint64_t cputick2usec (uint64_t tick)
 
 SYSCTL_PROC (_kern_timecounter, OID_AUTO, fast_gettime, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, NULL, 0, sysctl_fast_gettime, "I", "Enable fast time of day")
 
uint32_t tc_fill_vdso_timehands (struct vdso_timehands *vdso_th)
 

Variables

struct timecountertimecounter = &dummy_timecounter
 
int tc_min_ticktock_freq = 1
 
volatile time_t time_second = 1
 
volatile time_t time_uptime = 1
 
struct bintime boottimebin
 
struct timeval boottime
 
struct bintime bt_timethreshold
 
struct bintime bt_tickthreshold
 
sbintime_t sbt_timethreshold
 
sbintime_t sbt_tickthreshold
 
struct bintime tc_tick_bt
 
sbintime_t tc_tick_sbt
 
int tc_precexp
 
int tc_timepercentage = TC_DEFAULTPERC
 
int time_status
 
long time_esterror
 
cpu_tick_f * cpu_ticks = tc_cpu_ticks