Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

kernel/time.c File Reference

#include <linux/mm.h>
#include <linux/timex.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>

Include dependency graph for kernel/time.c:

Go to the source code of this file.

Functions

static void do_normal_gettime (struct timeval *tm)
void get_fast_time (struct timeval *t)
asmlinkage int sys_time (int *tloc)
asmlinkage int sys_stime (int *tptr)
asmlinkage int sys_gettimeofday (struct timeval *tv, struct timezone *tz)
static void warp_clock (void)
int do_sys_settimeofday (struct timeval *tv, struct timezone *tz)
asmlinkage int sys_settimeofday (struct timeval *tv, struct timezone *tz)
int do_adjtimex (struct timex *txc)
asmlinkage int sys_adjtimex (struct timex *txc_p)

Variables

timezone sys_tz = { 0, 0}
void(* do_get_fast_time )(struct timeval *) = do_normal_gettime
rwlock_t xtime_lock
long pps_offset = 0
long pps_jitter = MAXTIME
long pps_freq = 0
long pps_stabil = MAXFREQ
long pps_valid = PPS_VALID
int pps_shift = PPS_SHIFT
long pps_jitcnt = 0
long pps_calcnt = 0
long pps_errcnt = 0
long pps_stbcnt = 0
void(* hardpps_ptr )(struct timeval *) = (void (*)(struct timeval *))0


Function Documentation

int do_adjtimex struct timex txc  ) 
 

Definition at line 229 of file kernel/time.c.

References ADJ_ESTERROR, ADJ_FREQUENCY, ADJ_MAXERROR, ADJ_OFFSET, ADJ_OFFSET_SINGLESHOT, ADJ_STATUS, ADJ_TICK, ADJ_TIMECONST, timex::calcnt, CAP_SYS_TIME, capable, timex::constant, do_gettimeofday(), EINVAL, EPERM, timex::errcnt, timex::esterror, timex::freq, HZ, timex::jitcnt, timex::jitter, timex::maxerror, MAXFREQ, MAXPHASE, MAXSEC, MINSEC, timex::modes, NTP_PHASE_LIMIT, timex::offset, PPS_AVG, pps_calcnt, pps_errcnt, pps_freq, pps_jitcnt, pps_jitter, pps_offset, pps_shift, pps_stabil, pps_stbcnt, timex::ppsfreq, timex::precision, result, timex::shift, SHIFT_KF, SHIFT_KH, SHIFT_UPDATE, SHIFT_USEC, STA_CLOCKERR, STA_FLL, STA_FREQHOLD, STA_PLL, STA_PPSERROR, STA_PPSFREQ, STA_PPSJITTER, STA_PPSSIGNAL, STA_PPSTIME, STA_PPSWANDER, STA_RONLY, STA_UNSYNC, timex::stabil, timex::status, timex::stbcnt, tick, timex::tick, timex::time, time_adjust, time_constant, TIME_ERROR, time_esterror, time_freq, time_maxerror, time_offset, time_precision, time_reftime, time_state, time_status, time_tolerance, timex::tolerance, write_lock_irq, and write_unlock_irq.

Here is the call graph for this function:

static void do_normal_gettime struct timeval tm  )  [static]
 

Definition at line 41 of file kernel/time.c.

int do_sys_settimeofday struct timeval tv,
struct timezone tz
 

Definition at line 165 of file kernel/time.c.

References CAP_SYS_TIME, capable, do_settimeofday(), EPERM, and warp_clock().

Here is the call graph for this function:

void get_fast_time struct timeval t  ) 
 

Definition at line 54 of file kernel/time.c.

References do_get_fast_time.

Referenced by __initfunc(), dev_queue_xmit_nit(), evdev_event(), netif_rx(), nsc_ircc_dma_receive_complete(), nsc_ircc_hard_xmit_fir(), and zoran_reap_stat_com().

asmlinkage int sys_adjtimex struct timex txc_p  ) 
 

Definition at line 410 of file kernel/time.c.

References copy_from_user, copy_to_user, do_adjtimex(), EFAULT, and ret.

Referenced by solaris_ntp_adjtime(), and solaris_ntp_gettime().

Here is the call graph for this function:

asmlinkage int sys_gettimeofday struct timeval tv,
struct timezone tz
 

Definition at line 116 of file kernel/time.c.

References copy_to_user, do_gettimeofday(), and EFAULT.

Here is the call graph for this function:

asmlinkage int sys_settimeofday struct timeval tv,
struct timezone tz
 

Definition at line 191 of file kernel/time.c.

References copy_from_user, do_sys_settimeofday(), EFAULT, and NULL.

Here is the call graph for this function:

asmlinkage int sys_stime int *  tptr  ) 
 

Definition at line 95 of file kernel/time.c.

References CAP_SYS_TIME, capable, EFAULT, EPERM, get_user, NTP_PHASE_LIMIT, STA_UNSYNC, time_adjust, time_esterror, time_maxerror, time_status, value, write_lock_irq, and write_unlock_irq.

asmlinkage int sys_time int *  tloc  ) 
 

Definition at line 74 of file kernel/time.c.

References EFAULT, i, and put_user.

static void warp_clock void   )  [inline, static]
 

Definition at line 147 of file kernel/time.c.

References timezone::tz_minuteswest, write_lock_irq, and write_unlock_irq.

Referenced by do_sys_settimeofday().


Variable Documentation

void(* do_get_fast_time)(struct timeval *) = do_normal_gettime
 

Definition at line 46 of file kernel/time.c.

Referenced by __initfunc(), get_fast_time(), and set_system_time().

void(* hardpps_ptr)(struct timeval *) = (void (*)(struct timeval *))0
 

Definition at line 224 of file kernel/time.c.

long pps_calcnt = 0
 

Definition at line 219 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_errcnt = 0
 

Definition at line 220 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_freq = 0
 

Definition at line 211 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_jitcnt = 0
 

Definition at line 218 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_jitter = MAXTIME
 

Definition at line 209 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_offset = 0
 

Definition at line 208 of file kernel/time.c.

Referenced by do_adjtimex().

int pps_shift = PPS_SHIFT
 

Definition at line 216 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_stabil = MAXFREQ
 

Definition at line 212 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_stbcnt = 0
 

Definition at line 221 of file kernel/time.c.

Referenced by do_adjtimex().

long pps_valid = PPS_VALID
 

Definition at line 214 of file kernel/time.c.

struct timezone sys_tz = { 0, 0}
 

Definition at line 39 of file kernel/time.c.

rwlock_t xtime_lock
 

Definition at line 1499 of file kernel/sched.c.