tsc.c (16874) | tsc.c (17194) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz and Don Ahn. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz and Don Ahn. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 |
37 * $Id: clock.c,v 1.61 1996/06/17 12:50:22 bde Exp $ | 37 * $Id: clock.c,v 1.62 1996/07/01 18:00:47 bde Exp $ |
38 */ 39 40/* 41 * inittodr, settodr and support routines written 42 * by Christoph Robitschko <chmr@edvz.tu-graz.ac.at> 43 * 44 * reintroduced and updated by Chris Stenton <chris@gnome.co.uk> 8/10/94 45 */ --- 143 unchanged lines hidden (view full) --- 189 outb(TIMER_MODE, 190 TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); 191 outb(TIMER_CNTR0, timer0_max_count & 0xff); 192 outb(TIMER_CNTR0, timer0_max_count >> 8); 193 enable_intr(); 194 /* 195 * See microtime.s for this magic. 196 */ | 38 */ 39 40/* 41 * inittodr, settodr and support routines written 42 * by Christoph Robitschko <chmr@edvz.tu-graz.ac.at> 43 * 44 * reintroduced and updated by Chris Stenton <chris@gnome.co.uk> 8/10/94 45 */ --- 143 unchanged lines hidden (view full) --- 189 outb(TIMER_MODE, 190 TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); 191 outb(TIMER_CNTR0, timer0_max_count & 0xff); 192 outb(TIMER_CNTR0, timer0_max_count >> 8); 193 enable_intr(); 194 /* 195 * See microtime.s for this magic. 196 */ |
197 time.tv_usec += (27645 * | 197 time.tv_usec += (27465 * |
198 (timer0_prescaler_count - hardclock_max_count)) 199 >> 15; 200 if (time.tv_usec >= 1000000) 201 time.tv_usec -= 1000000; 202 timer0_prescaler_count = 0; 203 timer_func = hardclock;; 204 timer0_state = 0; 205 } --- 638 unchanged lines hidden --- | 198 (timer0_prescaler_count - hardclock_max_count)) 199 >> 15; 200 if (time.tv_usec >= 1000000) 201 time.tv_usec -= 1000000; 202 timer0_prescaler_count = 0; 203 timer_func = hardclock;; 204 timer0_state = 0; 205 } --- 638 unchanged lines hidden --- |