summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-25 07:38:47 +0000
committerbde <bde@FreeBSD.org>1995-12-25 07:38:47 +0000
commit01f94ecaacf0a1b5bb1b4943f306c122f829e675 (patch)
tree102d8ac0340299f3eb647fa4341410cac2e261be /sys
parent7c875c02aa22ebe1536ffcae3f94bc8a23eb19de (diff)
downloadFreeBSD-src-01f94ecaacf0a1b5bb1b4943f306c122f829e675.zip
FreeBSD-src-01f94ecaacf0a1b5bb1b4943f306c122f829e675.tar.gz
Fixed staticizing. Some functions aren't static but depend on
the undocumented previously unLINTed option `APM_SLOWSTART'.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/NOTES3
-rw-r--r--sys/i386/apm/apm.c14
-rw-r--r--sys/i386/bios/apm.c14
-rw-r--r--sys/i386/conf/LINT3
-rw-r--r--sys/i386/conf/NOTES3
-rw-r--r--sys/i386/include/apm_bios.h8
6 files changed, 33 insertions, 12 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 9eb1367..2c2e827 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.226 1995/12/24 08:11:46 davidg Exp $
+# $Id: LINT,v 1.227 1995/12/24 08:13:23 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -844,6 +844,7 @@ options POWERFAIL_NMI # make it beep instead of panicing
# More undocumented options for linting.
+options APM_SLOWSTART=1
options COMPAT_LINUX
options DEBUG
options "EXT2FS"
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index cc5ca85..3e9b813 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.20 1995/12/08 11:13:09 julian Exp $
+ * $Id: apm.c,v 1.21 1995/12/22 13:08:27 phk Exp $
*/
#include "apm.h"
@@ -361,8 +361,9 @@ apm_hook_establish(int apmh, struct apmhook *ah)
return apm_add_hook(&hook[apmh], ah);
}
+#ifdef notused
/* disestablish an apm hook */
-static void
+void
apm_hook_disestablish(int apmh, struct apmhook *ah)
{
if (apmh < 0 || apmh >= NAPM_HOOK)
@@ -370,6 +371,7 @@ apm_hook_disestablish(int apmh, struct apmhook *ah)
apm_del_hook(&hook[apmh], ah);
}
+#endif /* notused */
static struct timeval suspend_time;
@@ -476,8 +478,9 @@ apm_get_info(struct apm_softc *sc, apm_info_t aip)
}
+#ifdef APM_SLOWSTART
/* inform APM BIOS that CPU is idle */
-static void
+void
apm_cpu_idle(void)
{
struct apm_softc *sc = master_softc; /* XXX */
@@ -507,9 +510,11 @@ apm_cpu_idle(void)
__asm("sti ; hlt"); /* wait for interrupt */
}
}
+#endif /* APM_SLOWSTART */
+#if APM_SLOWSTART > 0
/* inform APM BIOS that CPU is busy */
-static void
+void
apm_cpu_busy(void)
{
struct apm_softc *sc = master_softc; /* XXX */
@@ -518,6 +523,7 @@ apm_cpu_busy(void)
__asm("movw $0x5306, %ax; lcall _apm_addr");
}
}
+#endif /* APM_SLOWSTART > 0 */
/*
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index cc5ca85..3e9b813 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.20 1995/12/08 11:13:09 julian Exp $
+ * $Id: apm.c,v 1.21 1995/12/22 13:08:27 phk Exp $
*/
#include "apm.h"
@@ -361,8 +361,9 @@ apm_hook_establish(int apmh, struct apmhook *ah)
return apm_add_hook(&hook[apmh], ah);
}
+#ifdef notused
/* disestablish an apm hook */
-static void
+void
apm_hook_disestablish(int apmh, struct apmhook *ah)
{
if (apmh < 0 || apmh >= NAPM_HOOK)
@@ -370,6 +371,7 @@ apm_hook_disestablish(int apmh, struct apmhook *ah)
apm_del_hook(&hook[apmh], ah);
}
+#endif /* notused */
static struct timeval suspend_time;
@@ -476,8 +478,9 @@ apm_get_info(struct apm_softc *sc, apm_info_t aip)
}
+#ifdef APM_SLOWSTART
/* inform APM BIOS that CPU is idle */
-static void
+void
apm_cpu_idle(void)
{
struct apm_softc *sc = master_softc; /* XXX */
@@ -507,9 +510,11 @@ apm_cpu_idle(void)
__asm("sti ; hlt"); /* wait for interrupt */
}
}
+#endif /* APM_SLOWSTART */
+#if APM_SLOWSTART > 0
/* inform APM BIOS that CPU is busy */
-static void
+void
apm_cpu_busy(void)
{
struct apm_softc *sc = master_softc; /* XXX */
@@ -518,6 +523,7 @@ apm_cpu_busy(void)
__asm("movw $0x5306, %ax; lcall _apm_addr");
}
}
+#endif /* APM_SLOWSTART > 0 */
/*
diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT
index 9eb1367..2c2e827 100644
--- a/sys/i386/conf/LINT
+++ b/sys/i386/conf/LINT
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.226 1995/12/24 08:11:46 davidg Exp $
+# $Id: LINT,v 1.227 1995/12/24 08:13:23 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -844,6 +844,7 @@ options POWERFAIL_NMI # make it beep instead of panicing
# More undocumented options for linting.
+options APM_SLOWSTART=1
options COMPAT_LINUX
options DEBUG
options "EXT2FS"
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 9eb1367..2c2e827 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
-# $Id: LINT,v 1.226 1995/12/24 08:11:46 davidg Exp $
+# $Id: LINT,v 1.227 1995/12/24 08:13:23 davidg Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@@ -844,6 +844,7 @@ options POWERFAIL_NMI # make it beep instead of panicing
# More undocumented options for linting.
+options APM_SLOWSTART=1
options COMPAT_LINUX
options DEBUG
options "EXT2FS"
diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h
index 7db76dc..5cebd37 100644
--- a/sys/i386/include/apm_bios.h
+++ b/sys/i386/include/apm_bios.h
@@ -12,7 +12,7 @@
*
* Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm_bios.h,v 1.5 1995/05/30 08:00:23 rgrimes Exp $
+ * $Id: apm_bios.h,v 1.6 1995/11/21 12:52:56 bde Exp $
*/
#ifndef _MACHINE_APM_BIOS_H_
@@ -135,9 +135,15 @@ struct apmhook {
void apm_suspend(void);
struct apmhook *apm_hook_establish (int apmh, struct apmhook *);
+#ifdef notused
void apm_hook_disestablish (int apmh, struct apmhook *);
+#endif
+#ifdef APM_SLOWSTART
void apm_cpu_idle(void);
+#endif
+#if APM_SLOWSTART > 0
void apm_cpu_busy(void);
+#endif
#endif /* !ASSEMBLER && !INITIALIZER */
OpenPOWER on IntegriCloud