Deleted Added
full compact
apm.c (91640) apm.c (92761)
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 * $FreeBSD: head/sys/i386/bios/apm.c 91640 2002-03-04 18:46:13Z iwasaki $
18 * $FreeBSD: head/sys/i386/bios/apm.c 92761 2002-03-20 05:48:58Z alfred $
19 */
20
21#include <sys/param.h>
22#include <sys/systm.h>
23#include <sys/eventhandler.h>
24#include <sys/conf.h>
25#include <sys/kernel.h>
26#include <sys/time.h>

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

43#include <sys/syslog.h>
44
45#include <machine/pc/bios.h>
46#include <machine/vm86.h>
47
48#include <i386/apm/apm.h>
49
50/* Used by the apm_saver screen saver module */
19 */
20
21#include <sys/param.h>
22#include <sys/systm.h>
23#include <sys/eventhandler.h>
24#include <sys/conf.h>
25#include <sys/kernel.h>
26#include <sys/time.h>

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

43#include <sys/syslog.h>
44
45#include <machine/pc/bios.h>
46#include <machine/vm86.h>
47
48#include <i386/apm/apm.h>
49
50/* Used by the apm_saver screen saver module */
51int apm_display __P((int newstate));
51int apm_display(int newstate);
52struct apm_softc apm_softc;
53
52struct apm_softc apm_softc;
53
54static void apm_resume __P((void));
54static void apm_resume(void);
55static int apm_bioscall(void);
55static int apm_bioscall(void);
56static int apm_check_function_supported __P((u_int version, u_int func));
56static int apm_check_function_supported(u_int version, u_int func);
57
58static int apm_pm_func(u_long, void*, ...);
59
60static u_long apm_version;
61
62int apm_evindex;
63
64#define SCFLAG_ONORMAL 0x0000001

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

399apm_hook_disestablish(int apmh, struct apmhook *ah)
400{
401 if (apmh < 0 || apmh >= NAPM_HOOK)
402 return;
403
404 apm_del_hook(&hook[apmh], ah);
405}
406
57
58static int apm_pm_func(u_long, void*, ...);
59
60static u_long apm_version;
61
62int apm_evindex;
63
64#define SCFLAG_ONORMAL 0x0000001

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

399apm_hook_disestablish(int apmh, struct apmhook *ah)
400{
401 if (apmh < 0 || apmh >= NAPM_HOOK)
402 return;
403
404 apm_del_hook(&hook[apmh], ah);
405}
406
407static int apm_record_event __P((struct apm_softc *, u_int));
407static int apm_record_event(struct apm_softc *, u_int);
408static void apm_processevent(void);
409
410static u_int apm_op_inprog = 0;
411
412static void
413apm_do_suspend(void)
414{
415 struct apm_softc *sc = &apm_softc;

--- 1017 unchanged lines hidden ---
408static void apm_processevent(void);
409
410static u_int apm_op_inprog = 0;
411
412static void
413apm_do_suspend(void)
414{
415 struct apm_softc *sc = &apm_softc;

--- 1017 unchanged lines hidden ---