FreeBSD kernel kern code
kern_time.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/limits.h>
#include <sys/clock.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/eventhandler.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/posix4.h>
#include <sys/time.h>
#include <sys/timers.h>
#include <sys/timetc.h>
#include <sys/vnode.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
Include dependency graph for kern_time.c:

Go to the source code of this file.

Data Structures

struct  clock_getcpuclockid2_args
 
struct  clock_gettime_args
 
struct  clock_settime_args
 
struct  clock_getres_args
 
struct  nanosleep_args
 
struct  gettimeofday_args
 
struct  settimeofday_args
 
struct  getitimer_args
 
struct  setitimer_args
 
struct  ktimer_create_args
 
struct  ktimer_delete_args
 
struct  ktimer_settime_args
 
struct  ktimer_gettime_args
 
struct  timer_getoverrun_args
 

Macros

#define MAX_CLOCKS   (CLOCK_MONOTONIC+1)
 
#define CPUCLOCK_BIT   0x80000000
 
#define CPUCLOCK_PROCESS_BIT   0x40000000
 
#define CPUCLOCK_ID_MASK   (~(CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT))
 
#define MAKE_THREAD_CPUCLOCK(tid)   (CPUCLOCK_BIT|(tid))
 
#define MAKE_PROCESS_CPUCLOCK(pid)   (CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT|(pid))
 
#define CLOCK_CALL(clock, call, arglist)   ((*posix_clocks[clock].call) arglist)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static int settime (struct thread *, struct timeval *)
 
static void timevalfix (struct timeval *)
 
static void itimer_start (void)
 
static int itimer_init (void *, int, int)
 
static void itimer_fini (void *, int)
 
static void itimer_enter (struct itimer *)
 
static void itimer_leave (struct itimer *)
 
static struct itimer * itimer_find (struct proc *, int)
 
static void itimers_alloc (struct proc *)
 
static void itimers_event_hook_exec (void *arg, struct proc *p, struct image_params *imgp)
 
static void itimers_event_hook_exit (void *arg, struct proc *p)
 
static int realtimer_create (struct itimer *)
 
static int realtimer_gettime (struct itimer *, struct itimerspec *)
 
static int realtimer_settime (struct itimer *, int, struct itimerspec *, struct itimerspec *)
 
static int realtimer_delete (struct itimer *)
 
static void realtimer_clocktime (clockid_t, struct timespec *)
 
static void realtimer_expire (void *)
 
int register_posix_clock (int, struct kclock *)
 
void itimer_fire (struct itimer *it)
 
int itimespecfix (struct timespec *ts)
 
 SYSINIT (posix_timer, SI_SUB_P1003_1B, SI_ORDER_FIRST+4, itimer_start, NULL)
 
int sys_clock_getcpuclockid2 (struct thread *td, struct clock_getcpuclockid2_args *uap)
 
int kern_clock_getcpuclockid2 (struct thread *td, id_t id, int which, clockid_t *clk_id)
 
int sys_clock_gettime (struct thread *td, struct clock_gettime_args *uap)
 
static void cputick2timespec (uint64_t runtime, struct timespec *ats)
 
static void get_thread_cputime (struct thread *targettd, struct timespec *ats)
 
static void get_process_cputime (struct proc *targetp, struct timespec *ats)
 
static int get_cputime (struct thread *td, clockid_t clock_id, struct timespec *ats)
 
int kern_clock_gettime (struct thread *td, clockid_t clock_id, struct timespec *ats)
 
int sys_clock_settime (struct thread *td, struct clock_settime_args *uap)
 
int kern_clock_settime (struct thread *td, clockid_t clock_id, struct timespec *ats)
 
int sys_clock_getres (struct thread *td, struct clock_getres_args *uap)
 
int kern_clock_getres (struct thread *td, clockid_t clock_id, struct timespec *ts)
 
int kern_nanosleep (struct thread *td, struct timespec *rqt, struct timespec *rmt)
 
int sys_nanosleep (struct thread *td, struct nanosleep_args *uap)
 
int sys_gettimeofday (struct thread *td, struct gettimeofday_args *uap)
 
int sys_settimeofday (struct thread *td, struct settimeofday_args *uap)
 
int kern_settimeofday (struct thread *td, struct timeval *tv, struct timezone *tzp)
 
int sys_getitimer (struct thread *td, struct getitimer_args *uap)
 
int kern_getitimer (struct thread *td, u_int which, struct itimerval *aitv)
 
int sys_setitimer (struct thread *td, struct setitimer_args *uap)
 
int kern_setitimer (struct thread *td, u_int which, struct itimerval *aitv, struct itimerval *oitv)
 
void realitexpire (void *arg)
 
int itimerfix (struct timeval *tv)
 
int itimerdecr (struct itimerval *itp, int usec)
 
void timevaladd (struct timeval *t1, const struct timeval *t2)
 
void timevalsub (struct timeval *t1, const struct timeval *t2)
 
int ratecheck (struct timeval *lasttime, const struct timeval *mininterval)
 
int ppsratecheck (struct timeval *lasttime, int *curpps, int maxpps)
 
int sys_ktimer_create (struct thread *td, struct ktimer_create_args *uap)
 
int kern_ktimer_create (struct thread *td, clockid_t clock_id, struct sigevent *evp, int *timerid, int preset_id)
 
int sys_ktimer_delete (struct thread *td, struct ktimer_delete_args *uap)
 
int kern_ktimer_delete (struct thread *td, int timerid)
 
int sys_ktimer_settime (struct thread *td, struct ktimer_settime_args *uap)
 
int kern_ktimer_settime (struct thread *td, int timer_id, int flags, struct itimerspec *val, struct itimerspec *oval)
 
int sys_ktimer_gettime (struct thread *td, struct ktimer_gettime_args *uap)
 
int kern_ktimer_gettime (struct thread *td, int timer_id, struct itimerspec *val)
 
int sys_ktimer_getoverrun (struct thread *td, struct ktimer_getoverrun_args *uap)
 
int kern_ktimer_getoverrun (struct thread *td, int timer_id)
 
int itimer_accept (struct proc *p, int timerid, ksiginfo_t *ksi)
 
static void itimers_event_hook_exec (void *arg, struct proc *p, struct image_params *imgp __unused)
 

Variables

static struct kclock posix_clocks [MAX_CLOCKS]
 
static uma_zone_t itimer_zone = NULL
 
static int nanowait
 

Macro Definition Documentation

#define CLOCK_CALL (   clock,
  call,
  arglist 
)    ((*posix_clocks[clock].call) arglist)
#define CPUCLOCK_BIT   0x80000000

Definition at line 61 of file kern_time.c.

#define CPUCLOCK_ID_MASK   (~(CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT))

Definition at line 63 of file kern_time.c.

Referenced by get_cputime().

#define CPUCLOCK_PROCESS_BIT   0x40000000

Definition at line 62 of file kern_time.c.

Referenced by get_cputime().

#define MAKE_PROCESS_CPUCLOCK (   pid)    (CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT|(pid))

Definition at line 65 of file kern_time.c.

Referenced by kern_clock_getcpuclockid2().

#define MAKE_THREAD_CPUCLOCK (   tid)    (CPUCLOCK_BIT|(tid))

Definition at line 64 of file kern_time.c.

Referenced by kern_clock_getcpuclockid2().

#define MAX_CLOCKS   (CLOCK_MONOTONIC+1)

Definition at line 60 of file kern_time.c.

Referenced by itimers_event_hook_exit(), kern_ktimer_create(), and register_posix_clock().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static void cputick2timespec ( uint64_t  runtime,
struct timespec *  ats 
)
inlinestatic

Definition at line 242 of file kern_time.c.

References cputick2usec().

Referenced by get_process_cputime(), and get_thread_cputime().

Here is the call graph for this function:

Here is the caller graph for this function:

static int get_cputime ( struct thread *  td,
clockid_t  clock_id,
struct timespec *  ats 
)
static

Definition at line 283 of file kern_time.c.

References CPUCLOCK_ID_MASK, CPUCLOCK_PROCESS_BIT, get_process_cputime(), get_thread_cputime(), pget(), and tdfind().

Referenced by kern_clock_gettime().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_process_cputime ( struct proc *  targetp,
struct timespec *  ats 
)
static

Definition at line 270 of file kern_time.c.

References cputick2timespec(), and rufetch().

Referenced by get_cputime(), and kern_clock_gettime().

Here is the call graph for this function:

Here is the caller graph for this function:

static void get_thread_cputime ( struct thread *  targettd,
struct timespec *  ats 
)
static

Definition at line 250 of file kern_time.c.

References cpu_ticks, cputick2timespec(), critical_enter(), and critical_exit().

Referenced by get_cputime(), and kern_clock_gettime().

Here is the call graph for this function:

Here is the caller graph for this function:

int itimer_accept ( struct proc *  p,
int  timerid,
ksiginfo_t *  ksi 
)

Definition at line 1468 of file kern_time.c.

References itimer_find().

Referenced by kern_sigtimedwait(), and postsig().

Here is the call graph for this function:

Here is the caller graph for this function:

static void itimer_enter ( struct itimer *  it)
static

Definition at line 1023 of file kern_time.c.

Referenced by kern_ktimer_gettime(), kern_ktimer_settime(), and realtimer_expire().

Here is the caller graph for this function:

static struct itimer * itimer_find ( struct proc *  p,
int  timerid 
)
static

Definition at line 1194 of file kern_time.c.

Referenced by itimer_accept(), kern_ktimer_delete(), kern_ktimer_getoverrun(), kern_ktimer_gettime(), and kern_ktimer_settime().

Here is the caller graph for this function:

static void itimer_fini ( void *  mem,
int  size 
)
static

Definition at line 1014 of file kern_time.c.

References mtx_destroy().

Referenced by itimer_start().

Here is the call graph for this function:

Here is the caller graph for this function:

void itimer_fire ( struct itimer *  it)

Definition at line 1545 of file kern_time.c.

References sigev_findtd(), and tdsendsignal().

Referenced by realtimer_expire().

Here is the call graph for this function:

Here is the caller graph for this function:

static int itimer_init ( void *  mem,
int  size,
int  flags 
)
static

Definition at line 1004 of file kern_time.c.

References mtx_init().

Referenced by itimer_start().

Here is the call graph for this function:

Here is the caller graph for this function:

static void itimer_leave ( struct itimer *  it)
static

Definition at line 1031 of file kern_time.c.

References wakeup().

Referenced by kern_ktimer_gettime(), kern_ktimer_settime(), and realtimer_expire().

Here is the call graph for this function:

Here is the caller graph for this function:

static void itimer_start ( void  )
static
int itimerdecr ( struct itimerval *  itp,
int  usec 
)

Definition at line 838 of file kern_time.c.

Referenced by hardclock_cnt(), and hardclock_cpu().

Here is the caller graph for this function:

int itimerfix ( struct timeval *  tv)

Definition at line 817 of file kern_time.c.

References tick.

Referenced by kern_aio_suspend(), kern_aio_waitcomplete(), kern_select(), kern_setitimer(), kqueue_scan(), selsocket(), and sys_poll().

Here is the caller graph for this function:

static void itimers_alloc ( struct proc *  p)
static

Definition at line 1575 of file kern_time.c.

References free(), and malloc().

Referenced by kern_ktimer_create().

Here is the call graph for this function:

Here is the caller graph for this function:

static void itimers_event_hook_exec ( void *  arg,
struct proc *  p,
struct image_params *  imgp 
)
static

Referenced by itimer_start().

Here is the caller graph for this function:

static void itimers_event_hook_exec ( void *  arg,
struct proc *  p,
struct image_params *imgp  __unused 
)
static

Definition at line 1598 of file kern_time.c.

References itimers_event_hook_exit().

Here is the call graph for this function:

static void itimers_event_hook_exit ( void *  arg,
struct proc *  p 
)
static

Definition at line 1605 of file kern_time.c.

References CLOCK_CALL, free(), kern_ktimer_delete(), MAX_CLOCKS, panic(), and posix_clocks.

Referenced by itimer_start(), and itimers_event_hook_exec().

Here is the call graph for this function:

Here is the caller graph for this function:

int itimespecfix ( struct timespec *  ts)

Definition at line 1485 of file kern_time.c.

References tick.

Referenced by realtimer_settime().

Here is the caller graph for this function:

int kern_clock_getcpuclockid2 ( struct thread *  td,
id_t  id,
int  which,
clockid_t *  clk_id 
)

Definition at line 191 of file kern_time.c.

References MAKE_PROCESS_CPUCLOCK, MAKE_THREAD_CPUCLOCK, and pget().

Referenced by sys_clock_getcpuclockid2().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_clock_getres ( struct thread *  td,
clockid_t  clock_id,
struct timespec *  ts 
)

Definition at line 430 of file kern_time.c.

References cpu_tickrate(), hz, and tc_getfrequency().

Referenced by sys_clock_getres().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_clock_gettime ( struct thread *  td,
clockid_t  clock_id,
struct timespec *  ats 
)

Definition at line 311 of file kern_time.c.

References calcru(), get_cputime(), get_process_cputime(), get_thread_cputime(), getnanotime(), getnanouptime(), nanotime(), nanouptime(), time_second, and timevaladd().

Referenced by do_cv_wait(), and sys_clock_gettime().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_clock_settime ( struct thread *  td,
clockid_t  clock_id,
struct timespec *  ats 
)

Definition at line 391 of file kern_time.c.

References priv_check(), and settime().

Referenced by sys_clock_settime().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_getitimer ( struct thread *  td,
u_int  which,
struct itimerval *  aitv 
)

Definition at line 664 of file kern_time.c.

References getmicrouptime(), and timevalsub().

Referenced by kern_setitimer(), and sys_getitimer().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_ktimer_create ( struct thread *  td,
clockid_t  clock_id,
struct sigevent *  evp,
int *  timerid,
int  preset_id 
)

Definition at line 1073 of file kern_time.c.

References CLOCK_CALL, itimer_zone, itimers_alloc(), MAX_CLOCKS, and posix_clocks.

Referenced by sys_ktimer_create().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_ktimer_delete ( struct thread *  td,
int  timerid 
)

Definition at line 1213 of file kern_time.c.

References CLOCK_CALL, itimer_find(), itimer_zone, and sigqueue_take().

Referenced by itimers_event_hook_exit(), sys_ktimer_create(), and sys_ktimer_delete().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_ktimer_getoverrun ( struct thread *  td,
int  timer_id 
)

Definition at line 1345 of file kern_time.c.

References itimer_find().

Referenced by sys_ktimer_getoverrun().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_ktimer_gettime ( struct thread *  td,
int  timer_id,
struct itimerspec *  val 
)

Definition at line 1311 of file kern_time.c.

References CLOCK_CALL, itimer_enter(), itimer_find(), and itimer_leave().

Referenced by sys_ktimer_gettime().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_ktimer_settime ( struct thread *  td,
int  timer_id,
int  flags,
struct itimerspec *  val,
struct itimerspec *  oval 
)

Definition at line 1269 of file kern_time.c.

References CLOCK_CALL, itimer_enter(), itimer_find(), and itimer_leave().

Referenced by sys_ktimer_settime().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_nanosleep ( struct thread *  td,
struct timespec *  rqt,
struct timespec *  rmt 
)

Definition at line 479 of file kern_time.c.

References getnanouptime(), nanowait, ts, and tvtohz().

Referenced by sys_nanosleep().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_setitimer ( struct thread *  td,
u_int  which,
struct itimerval *  aitv,
struct itimerval *  oitv 
)

Definition at line 723 of file kern_time.c.

References getmicrouptime(), itimerfix(), kern_getitimer(), realitexpire(), timevaladd(), timevalsub(), and tvtohz().

Referenced by sys_setitimer().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_settimeofday ( struct thread *  td,
struct timeval *  tv,
struct timezone *  tzp 
)

Definition at line 604 of file kern_time.c.

References priv_check(), settime(), tz_dsttime, and tz_minuteswest.

Referenced by sys_settimeofday().

Here is the call graph for this function:

Here is the caller graph for this function:

int ppsratecheck ( struct timeval *  lasttime,
int *  curpps,
int  maxpps 
)

Definition at line 948 of file kern_time.c.

References hz, and ticks.

Referenced by falloc_noinstall(), fork1(), ithread_execute_handlers(), malloc(), pipespace_new(), and vfs_mountroot_wait().

Here is the caller graph for this function:

int ratecheck ( struct timeval *  lasttime,
const struct timeval *  mininterval 
)

Definition at line 911 of file kern_time.c.

References getmicrouptime(), and timevalsub().

Referenced by sonewconn().

Here is the call graph for this function:

Here is the caller graph for this function:

void realitexpire ( void *  arg)

Definition at line 782 of file kern_time.c.

References getmicrouptime(), kern_psignal(), timevaladd(), timevalsub(), tvtohz(), and wakeup().

Referenced by kern_setitimer().

Here is the call graph for this function:

Here is the caller graph for this function:

static void realtimer_clocktime ( clockid_t  id,
struct timespec *  ts 
)
static

Definition at line 1459 of file kern_time.c.

References getnanotime(), and getnanouptime().

Referenced by realtimer_expire(), realtimer_gettime(), and realtimer_settime().

Here is the call graph for this function:

Here is the caller graph for this function:

static int realtimer_create ( struct itimer *  it)
static

Definition at line 1366 of file kern_time.c.

Referenced by itimer_start().

Here is the caller graph for this function:

static int realtimer_delete ( struct itimer *  it)
static

Definition at line 1373 of file kern_time.c.

Referenced by itimer_start().

Here is the caller graph for this function:

static void realtimer_expire ( void *  arg)
static

Definition at line 1497 of file kern_time.c.

References itimer_enter(), itimer_fire(), itimer_leave(), realtimer_clocktime(), and tvtohz().

Referenced by realtimer_settime().

Here is the call graph for this function:

Here is the caller graph for this function:

static int realtimer_gettime ( struct itimer *  it,
struct itimerspec *  ovalue 
)
static

Definition at line 1390 of file kern_time.c.

References realtimer_clocktime().

Referenced by itimer_start(), and realtimer_settime().

Here is the call graph for this function:

Here is the caller graph for this function:

static int realtimer_settime ( struct itimer *  it,
int  flags,
struct itimerspec *  value,
struct itimerspec *  ovalue 
)
static

Definition at line 1411 of file kern_time.c.

References itimespecfix(), realtimer_clocktime(), realtimer_expire(), realtimer_gettime(), tvtohz(), and value.

Referenced by itimer_start().

Here is the call graph for this function:

Here is the caller graph for this function:

int register_posix_clock ( int  clockid,
struct kclock *  clk 
)

Definition at line 993 of file kern_time.c.

References MAX_CLOCKS, posix_clocks, and printf().

Referenced by itimer_start().

Here is the call graph for this function:

Here is the caller graph for this function:

static int settime ( struct thread *  td,
struct timeval *  tv 
)
static

Definition at line 112 of file kern_time.c.

References Giant, microtime(), printf(), resettodr(), securelevel_gt(), tc_setclock(), and timevalsub().

Referenced by kern_clock_settime(), and kern_settimeofday().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_clock_getcpuclockid2 ( struct thread *  td,
struct clock_getcpuclockid2_args uap 
)

Definition at line 179 of file kern_time.c.

References clock_getcpuclockid2_args::clock_id, clock_getcpuclockid2_args::id, kern_clock_getcpuclockid2(), and clock_getcpuclockid2_args::which.

Here is the call graph for this function:

int sys_clock_getres ( struct thread *  td,
struct clock_getres_args uap 
)

Definition at line 415 of file kern_time.c.

References clock_getres_args::clock_id, kern_clock_getres(), and clock_getres_args::tp.

Here is the call graph for this function:

int sys_clock_gettime ( struct thread *  td,
struct clock_gettime_args uap 
)

Definition at line 229 of file kern_time.c.

References clock_gettime_args::clock_id, kern_clock_gettime(), and clock_gettime_args::tp.

Here is the call graph for this function:

int sys_clock_settime ( struct thread *  td,
struct clock_settime_args uap 
)

Definition at line 380 of file kern_time.c.

References clock_settime_args::clock_id, kern_clock_settime(), and clock_settime_args::tp.

Here is the call graph for this function:

int sys_getitimer ( struct thread *  td,
struct getitimer_args uap 
)

Definition at line 652 of file kern_time.c.

References getitimer_args::itv, kern_getitimer(), and getitimer_args::which.

Referenced by sys_setitimer().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_gettimeofday ( struct thread *  td,
struct gettimeofday_args uap 
)

Definition at line 554 of file kern_time.c.

References microtime(), gettimeofday_args::tp, tz_dsttime, tz_minuteswest, and gettimeofday_args::tzp.

Here is the call graph for this function:

int sys_ktimer_create ( struct thread *  td,
struct ktimer_create_args uap 
)

Definition at line 1049 of file kern_time.c.

References ktimer_create_args::clock_id, ktimer_create_args::evp, kern_ktimer_create(), kern_ktimer_delete(), and ktimer_create_args::timerid.

Here is the call graph for this function:

int sys_ktimer_delete ( struct thread *  td,
struct ktimer_delete_args uap 
)

Definition at line 1187 of file kern_time.c.

References kern_ktimer_delete(), and ktimer_delete_args::timerid.

Here is the call graph for this function:

int sys_ktimer_getoverrun ( struct thread *  td,
struct ktimer_getoverrun_args *  uap 
)

Definition at line 1338 of file kern_time.c.

References kern_ktimer_getoverrun().

Here is the call graph for this function:

int sys_ktimer_gettime ( struct thread *  td,
struct ktimer_gettime_args uap 
)

Definition at line 1299 of file kern_time.c.

References kern_ktimer_gettime(), ktimer_gettime_args::timerid, and ktimer_gettime_args::value.

Here is the call graph for this function:

int sys_ktimer_settime ( struct thread *  td,
struct ktimer_settime_args uap 
)

Definition at line 1253 of file kern_time.c.

References ktimer_settime_args::flags, kern_ktimer_settime(), ktimer_settime_args::ovalue, ktimer_settime_args::timerid, and ktimer_settime_args::value.

Here is the call graph for this function:

int sys_nanosleep ( struct thread *  td,
struct nanosleep_args uap 
)

Definition at line 523 of file kern_time.c.

References kern_nanosleep(), nanosleep_args::rmtp, and nanosleep_args::rqtp.

Here is the call graph for this function:

int sys_setitimer ( struct thread *  td,
struct setitimer_args uap 
)

Definition at line 704 of file kern_time.c.

References setitimer_args::itv, kern_setitimer(), setitimer_args::oitv, sys_getitimer(), and setitimer_args::which.

Here is the call graph for this function:

int sys_settimeofday ( struct thread *  td,
struct settimeofday_args uap 
)

Definition at line 580 of file kern_time.c.

References kern_settimeofday(), settimeofday_args::tv, and settimeofday_args::tzp.

Here is the call graph for this function:

SYSINIT ( posix_timer  ,
SI_SUB_P1003_1B  ,
SI_ORDER_FIRST+  4,
itimer_start  ,
NULL   
)
void timevaladd ( struct timeval *  t1,
const struct timeval *  t2 
)

Definition at line 876 of file kern_time.c.

References timevalfix().

Referenced by acct_process(), fill_kinfo_proc_only(), kern_clock_gettime(), kern_select(), kern_setitimer(), kqueue_scan(), realitexpire(), selsocket(), sys_poll(), and ttydisc_read_raw_read_timer().

Here is the call graph for this function:

Here is the caller graph for this function:

static void timevalfix ( struct timeval *  t1)
static

Definition at line 894 of file kern_time.c.

Referenced by timevaladd(), and timevalsub().

Here is the caller graph for this function:

void timevalsub ( struct timeval *  t1,
const struct timeval *  t2 
)

Definition at line 885 of file kern_time.c.

References timevalfix().

Referenced by acct_process(), kern_getitimer(), kern_select(), kern_setitimer(), kqueue_scan(), ratecheck(), realitexpire(), selsocket(), settime(), sys_poll(), tty_info(), and ttydisc_read_raw_read_timer().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

uma_zone_t itimer_zone = NULL
static

Definition at line 69 of file kern_time.c.

Referenced by itimer_start(), kern_ktimer_create(), and kern_ktimer_delete().

int nanowait
static

Definition at line 476 of file kern_time.c.

Referenced by kern_nanosleep().

struct kclock posix_clocks[MAX_CLOCKS]
static

Definition at line 68 of file kern_time.c.

Referenced by itimers_event_hook_exit(), kern_ktimer_create(), and register_posix_clock().