FreeBSD kernel kern code
subr_rtc.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/clock.h>
#include <sys/sysctl.h>
#include <sys/timetc.h>
#include "clock_if.h"
Include dependency graph for subr_rtc.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
 SYSCTL_INT (_machdep, OID_AUTO, disable_rtc_set, CTLFLAG_RW,&disable_rtc_set, 0,"Disallow adjusting time-of-day clock")
 
void clock_register (device_t dev, long res)
 
void inittodr (time_t base)
 
void resettodr (void)
 

Variables

static device_t clock_dev = NULL
 
static long clock_res
 
static struct timespec clock_adj
 
static int disable_rtc_set
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void clock_register ( device_t  dev,
long  res 
)

Definition at line 73 of file subr_rtc.c.

References bootverbose, clock_adj, clock_dev, clock_res, device_get_name(), and device_printf().

Here is the call graph for this function:

void inittodr ( time_t  base)

Definition at line 110 of file subr_rtc.c.

References clock_adj, clock_dev, printf(), tc_setclock(), and utc_offset().

Referenced by vfs_mountroot().

Here is the call graph for this function:

Here is the caller graph for this function:

void resettodr ( void  )

Definition at line 150 of file subr_rtc.c.

References clock_adj, clock_dev, disable_rtc_set, getnanotime(), printf(), and utc_offset().

Referenced by periodic_resettodr(), settime(), shutdown_resettodr(), and sysctl_machdep_adjkerntz().

Here is the call graph for this function:

Here is the caller graph for this function:

SYSCTL_INT ( _machdep  ,
OID_AUTO  ,
disable_rtc_set  ,
CTLFLAG_RW  ,
disable_rtc_set,
,
"Disallow adjusting time-of-day clock  
)

Variable Documentation

struct timespec clock_adj
static

Definition at line 65 of file subr_rtc.c.

Referenced by clock_register(), inittodr(), and resettodr().

device_t clock_dev = NULL
static

Definition at line 63 of file subr_rtc.c.

Referenced by clock_register(), inittodr(), and resettodr().

long clock_res
static

Definition at line 64 of file subr_rtc.c.

Referenced by clock_register().

int disable_rtc_set
static

Definition at line 68 of file subr_rtc.c.

Referenced by resettodr().