kern_ntptime.c (9b2e535452929d6f2f798a2c01b23b1f547a0b0f) | kern_ntptime.c (d2d3e8751c3b7831f7064ccf400978b75b696547) |
---|---|
1/****************************************************************************** 2 * * 3 * Copyright (c) David L. Mills 1993, 1994 * 4 * * 5 * Permission to use, copy, modify, and distribute this software and its * 6 * documentation for any purpose and without fee is hereby granted, provided * 7 * that the above copyright notice appears in all copies and that both the * 8 * copyright notice and this permission notice appear in supporting * --- 31 unchanged lines hidden (view full) --- 40 * (dispersion) to client user application programs. The ntp_adjtime() 41 * routine is used by the NTP daemon to adjust the system clock to an 42 * externally derived time. The time offset and related variables set by 43 * this routine are used by hardclock() to adjust the phase and 44 * frequency of the phase-lock loop which controls the system clock. 45 */ 46#include <sys/param.h> 47#include <sys/systm.h> | 1/****************************************************************************** 2 * * 3 * Copyright (c) David L. Mills 1993, 1994 * 4 * * 5 * Permission to use, copy, modify, and distribute this software and its * 6 * documentation for any purpose and without fee is hereby granted, provided * 7 * that the above copyright notice appears in all copies and that both the * 8 * copyright notice and this permission notice appear in supporting * --- 31 unchanged lines hidden (view full) --- 40 * (dispersion) to client user application programs. The ntp_adjtime() 41 * routine is used by the NTP daemon to adjust the system clock to an 42 * externally derived time. The time offset and related variables set by 43 * this routine are used by hardclock() to adjust the phase and 44 * frequency of the phase-lock loop which controls the system clock. 45 */ 46#include <sys/param.h> 47#include <sys/systm.h> |
48#include <sys/sysproto.h> |
|
48#include <sys/kernel.h> 49#include <sys/proc.h> 50#include <sys/timex.h> 51#include <vm/vm.h> 52#include <sys/sysctl.h> 53 54/* 55 * The following variables are used by the hardclock() routine in the --- 107 unchanged lines hidden (view full) --- 163 ntv.time_state = TIME_ERROR; 164 } 165 return(sysctl_rdstruct(oldp, oldlenp, newp, &ntv, sizeof ntv)); 166} 167 168/* 169 * ntp_adjtime() - NTP daemon application interface 170 */ | 49#include <sys/kernel.h> 50#include <sys/proc.h> 51#include <sys/timex.h> 52#include <vm/vm.h> 53#include <sys/sysctl.h> 54 55/* 56 * The following variables are used by the hardclock() routine in the --- 107 unchanged lines hidden (view full) --- 164 ntv.time_state = TIME_ERROR; 165 } 166 return(sysctl_rdstruct(oldp, oldlenp, newp, &ntv, sizeof ntv)); 167} 168 169/* 170 * ntp_adjtime() - NTP daemon application interface 171 */ |
172#ifndef _SYS_SYSPROTO_H_ |
|
171struct ntp_adjtime_args { 172 struct timex *tp; 173}; | 173struct ntp_adjtime_args { 174 struct timex *tp; 175}; |
176#endif |
|
174 175int 176ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap, int *retval) 177{ 178 struct timex ntv; 179 int modes; 180 int s; 181 int error; --- 88 unchanged lines hidden --- | 177 178int 179ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap, int *retval) 180{ 181 struct timex ntv; 182 int modes; 183 int s; 184 int error; --- 88 unchanged lines hidden --- |