Deleted Added
full compact
pmtimer.c (65865) pmtimer.c (82971)
1/*-
2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/i386/isa/pmtimer.c 65865 2000-09-14 22:34:57Z iwasaki $
26 * $FreeBSD: head/sys/i386/isa/pmtimer.c 82971 2001-09-04 16:02:06Z iwasaki $
27 */
28
29/*
30 * Timer device driver for power management events.
31 * The code for suspend/resume is derived from APM device driver.
32 */
33
34#include <sys/param.h>

--- 43 unchanged lines hidden (view full) ---

78pmtimer_resume(device_t dev)
79{
80 int pl;
81 u_int second, minute, hour;
82 struct timeval resume_time, tmp_time;
83
84 /* modified for adjkerntz */
85 pl = splsoftclock();
27 */
28
29/*
30 * Timer device driver for power management events.
31 * The code for suspend/resume is derived from APM device driver.
32 */
33
34#include <sys/param.h>

--- 43 unchanged lines hidden (view full) ---

78pmtimer_resume(device_t dev)
79{
80 int pl;
81 u_int second, minute, hour;
82 struct timeval resume_time, tmp_time;
83
84 /* modified for adjkerntz */
85 pl = splsoftclock();
86 i8254_restore(); /* restore timer_freq and hz */
86 timer_restore(); /* restore the all timers */
87 inittodr(0); /* adjust time to RTC */
88 microtime(&resume_time);
89 getmicrotime(&tmp_time);
90 timevaladd(&tmp_time, &diff_time);
91
92#ifdef FIXME
93 /* XXX THIS DOESN'T WORK!!! */
94 time = tmp_time;

--- 45 unchanged lines hidden ---
87 inittodr(0); /* adjust time to RTC */
88 microtime(&resume_time);
89 getmicrotime(&tmp_time);
90 timevaladd(&tmp_time, &diff_time);
91
92#ifdef FIXME
93 /* XXX THIS DOESN'T WORK!!! */
94 time = tmp_time;

--- 45 unchanged lines hidden ---