Deleted Added
full compact
apm.c (33181) apm.c (34961)
1/*
2 * APM (Advanced Power Management) BIOS Device Driver
3 *
4 * Copyright (c) 1994 UKAI, Fumitoshi.
5 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
6 * Copyright (c) 1996 Nate Williams <nate@FreeBSD.org>
7 * Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org>
8 *
9 * This software may be used, modified, copied, and distributed, in
10 * both source and binary form provided that the above copyright and
11 * these terms are retained. Under no circumstances is the author
12 * responsible for the proper functioning of this software, nor does
13 * the author assume any responsibility for damages incurred with its
14 * use.
15 *
16 * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
17 *
1/*
2 * APM (Advanced Power Management) BIOS Device Driver
3 *
4 * Copyright (c) 1994 UKAI, Fumitoshi.
5 * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>
6 * Copyright (c) 1996 Nate Williams <nate@FreeBSD.org>
7 * Copyright (c) 1997 Poul-Henning Kamp <phk@FreeBSD.org>
8 *
9 * This software may be used, modified, copied, and distributed, in
10 * both source and binary form provided that the above copyright and
11 * these terms are retained. Under no circumstances is the author
12 * responsible for the proper functioning of this software, nor does
13 * the author assume any responsibility for damages incurred with its
14 * use.
15 *
16 * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
17 *
18 * $Id: apm.c,v 1.68 1998/01/24 02:54:08 eivind Exp $
18 * $Id: apm.c,v 1.69 1998/02/09 06:08:06 eivind Exp $
19 */
20
21#include "opt_devfs.h"
22
23#include <sys/param.h>
24#include <sys/conf.h>
25#include <sys/kernel.h>
26#ifdef DEVFS

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

359 int pl;
360 u_int second, minute, hour;
361 struct timeval resume_time, tmp_time;
362
363 /* modified for adjkerntz */
364 pl = splsoftclock();
365 inittodr(0); /* adjust time to RTC */
366 microtime(&resume_time);
19 */
20
21#include "opt_devfs.h"
22
23#include <sys/param.h>
24#include <sys/conf.h>
25#include <sys/kernel.h>
26#ifdef DEVFS

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

359 int pl;
360 u_int second, minute, hour;
361 struct timeval resume_time, tmp_time;
362
363 /* modified for adjkerntz */
364 pl = splsoftclock();
365 inittodr(0); /* adjust time to RTC */
366 microtime(&resume_time);
367 tmp_time = time; /* because 'time' is volatile */
367 getmicrotime(&tmp_time);
368 timevaladd(&tmp_time, &diff_time);
368 timevaladd(&tmp_time, &diff_time);
369
370#ifdef FIXME
371 /* XXX THIS DOESN'T WORK!!! */
369 time = tmp_time;
372 time = tmp_time;
373#endif
374
370#ifdef APM_FIXUP_CALLTODO
371 /* Calculate the delta time suspended */
372 timevalsub(&resume_time, &suspend_time);
373 /* Fixup the calltodo list with the delta time. */
374 adjust_timeout_calltodo(&resume_time);
375#endif /* APM_FIXUP_CALLTODOK */
376 splx(pl);
377#ifndef APM_FIXUP_CALLTODO

--- 554 unchanged lines hidden ---
375#ifdef APM_FIXUP_CALLTODO
376 /* Calculate the delta time suspended */
377 timevalsub(&resume_time, &suspend_time);
378 /* Fixup the calltodo list with the delta time. */
379 adjust_timeout_calltodo(&resume_time);
380#endif /* APM_FIXUP_CALLTODOK */
381 splx(pl);
382#ifndef APM_FIXUP_CALLTODO

--- 554 unchanged lines hidden ---