kern_time.c (52644) | kern_time.c (58377) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 |
34 * $FreeBSD: head/sys/kern/kern_time.c 52644 1999-10-30 06:32:05Z phk $ | 34 * $FreeBSD: head/sys/kern/kern_time.c 58377 2000-03-20 14:09:06Z phk $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/sysproto.h> 41#include <sys/resourcevar.h> 42#include <sys/signalvar.h> 43#include <sys/kernel.h> 44#include <sys/systm.h> 45#include <sys/sysent.h> 46#include <sys/proc.h> 47#include <sys/time.h> | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/sysproto.h> 41#include <sys/resourcevar.h> 42#include <sys/signalvar.h> 43#include <sys/kernel.h> 44#include <sys/systm.h> 45#include <sys/sysent.h> 46#include <sys/proc.h> 47#include <sys/time.h> |
48#include <sys/timetc.h> |
|
48#include <sys/vnode.h> 49#include <vm/vm.h> 50#include <vm/vm_extern.h> 51 52struct timezone tz; 53 54/* 55 * Time of day and interval timer support. --- 67 unchanged lines hidden (view full) --- 123 printf("Time adjustment clamped to +1 second\n"); 124 } 125 laststep = *tv; 126 } 127 } 128 129 ts.tv_sec = tv->tv_sec; 130 ts.tv_nsec = tv->tv_usec * 1000; | 49#include <sys/vnode.h> 50#include <vm/vm.h> 51#include <vm/vm_extern.h> 52 53struct timezone tz; 54 55/* 56 * Time of day and interval timer support. --- 67 unchanged lines hidden (view full) --- 124 printf("Time adjustment clamped to +1 second\n"); 125 } 126 laststep = *tv; 127 } 128 } 129 130 ts.tv_sec = tv->tv_sec; 131 ts.tv_nsec = tv->tv_usec * 1000; |
131 set_timecounter(&ts); | 132 tc_setclock(&ts); |
132 (void) splsoftclock(); 133 lease_updatetime(delta.tv_sec); 134 splx(s); 135 resettodr(); 136 return (0); 137} 138 139#ifndef _SYS_SYSPROTO_H_ --- 535 unchanged lines hidden --- | 133 (void) splsoftclock(); 134 lease_updatetime(delta.tv_sec); 135 splx(s); 136 resettodr(); 137 return (0); 138} 139 140#ifndef _SYS_SYSPROTO_H_ --- 535 unchanged lines hidden --- |