Round tickadj up. This prevents tickadj from being 0 when HZ > 500,
which makes adjtime(2) useless and confuses xntpd(8) into refusing to start even when it would use the kernel PLL instead of adjtime(). The result is the same as recommended by tickadj(8), at least when HZ divides 10^6. Of course, you wouldn't want to actually use adjtime() when HZ is large. In the silly boundary case of HZ == 10^6, tickadj == tick == 1 so the clock stops while adjtime() is active.
This commit is contained in:
parent
316bbd5c6f
commit
df471779ea
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)param.c 8.3 (Berkeley) 8/20/94
|
||||
* $Id: param.c,v 1.26 1998/02/27 19:58:29 guido Exp $
|
||||
* $Id: param.c,v 1.27 1998/05/15 20:10:54 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
@ -70,7 +70,7 @@
|
||||
#endif
|
||||
int hz = HZ;
|
||||
int tick = 1000000 / HZ;
|
||||
int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */
|
||||
int tickadj = howmany(30000, 60 * HZ); /* can adjust 30ms in 60s */
|
||||
#define NPROC (20 + 16 * MAXUSERS)
|
||||
#define MAXFILES (NPROC*2)
|
||||
int maxproc = NPROC; /* maximum # of processes */
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)param.c 8.3 (Berkeley) 8/20/94
|
||||
* $Id: param.c,v 1.26 1998/02/27 19:58:29 guido Exp $
|
||||
* $Id: param.c,v 1.27 1998/05/15 20:10:54 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
@ -70,7 +70,7 @@
|
||||
#endif
|
||||
int hz = HZ;
|
||||
int tick = 1000000 / HZ;
|
||||
int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */
|
||||
int tickadj = howmany(30000, 60 * HZ); /* can adjust 30ms in 60s */
|
||||
#define NPROC (20 + 16 * MAXUSERS)
|
||||
#define MAXFILES (NPROC*2)
|
||||
int maxproc = NPROC; /* maximum # of processes */
|
||||
|
Loading…
Reference in New Issue
Block a user