Sync with sys/i386/i386/trap.c revision 1.125 and sys/i386/isa/clock.c
revision 1.118.
This commit is contained in:
parent
f30464b574
commit
01d7f184bf
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.49 1998/03/15 13:35:42 kato Exp $
|
||||
* $Id: clock.c,v 1.50 1998/03/17 08:42:18 kato Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -270,6 +270,12 @@ clkintr(struct clockframe frame)
|
||||
if ((timer0_prescaler_count += timer0_max_count)
|
||||
>= hardclock_max_count) {
|
||||
timer0_prescaler_count -= hardclock_max_count;
|
||||
#ifdef FIXME
|
||||
/*
|
||||
* XXX: This magic doesn't work, but It shouldn't be
|
||||
* needed now anyway since we will not be able to
|
||||
* aquire the i8254 if it is used for timecounting.
|
||||
*/
|
||||
/*
|
||||
* See microtime.s for this magic.
|
||||
*/
|
||||
@ -293,6 +299,7 @@ clkintr(struct clockframe frame)
|
||||
#endif
|
||||
if (time.tv_usec >= 1000000)
|
||||
time.tv_usec -= 1000000;
|
||||
#endif
|
||||
hardclock(&frame);
|
||||
setdelayed();
|
||||
timer0_max_count = hardclock_max_count;
|
||||
@ -1096,7 +1103,7 @@ inittodr(time_t base)
|
||||
|
||||
sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0);
|
||||
|
||||
y = time.tv_sec - sec;
|
||||
y = time_second - sec;
|
||||
if (y <= -2 || y >= 2) {
|
||||
/* badly off, adjust it */
|
||||
s = splclock();
|
||||
@ -1128,7 +1135,7 @@ resettodr()
|
||||
return;
|
||||
|
||||
s = splclock();
|
||||
tm = time.tv_sec;
|
||||
tm = time_second;
|
||||
splx(s);
|
||||
|
||||
#ifdef PC98
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.49 1998/03/15 13:35:42 kato Exp $
|
||||
* $Id: clock.c,v 1.50 1998/03/17 08:42:18 kato Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -270,6 +270,12 @@ clkintr(struct clockframe frame)
|
||||
if ((timer0_prescaler_count += timer0_max_count)
|
||||
>= hardclock_max_count) {
|
||||
timer0_prescaler_count -= hardclock_max_count;
|
||||
#ifdef FIXME
|
||||
/*
|
||||
* XXX: This magic doesn't work, but It shouldn't be
|
||||
* needed now anyway since we will not be able to
|
||||
* aquire the i8254 if it is used for timecounting.
|
||||
*/
|
||||
/*
|
||||
* See microtime.s for this magic.
|
||||
*/
|
||||
@ -293,6 +299,7 @@ clkintr(struct clockframe frame)
|
||||
#endif
|
||||
if (time.tv_usec >= 1000000)
|
||||
time.tv_usec -= 1000000;
|
||||
#endif
|
||||
hardclock(&frame);
|
||||
setdelayed();
|
||||
timer0_max_count = hardclock_max_count;
|
||||
@ -1096,7 +1103,7 @@ inittodr(time_t base)
|
||||
|
||||
sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0);
|
||||
|
||||
y = time.tv_sec - sec;
|
||||
y = time_second - sec;
|
||||
if (y <= -2 || y >= 2) {
|
||||
/* badly off, adjust it */
|
||||
s = splclock();
|
||||
@ -1128,7 +1135,7 @@ resettodr()
|
||||
return;
|
||||
|
||||
s = splclock();
|
||||
tm = time.tv_sec;
|
||||
tm = time_second;
|
||||
splx(s);
|
||||
|
||||
#ifdef PC98
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.46 1998/03/24 08:27:21 kato Exp $
|
||||
* $Id: trap.c,v 1.47 1998/03/29 12:48:01 kato Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -547,11 +547,11 @@ kernel_trap:
|
||||
{
|
||||
static unsigned lastalert = 0;
|
||||
|
||||
if(time.tv_sec - lastalert > 10)
|
||||
if(time_second - lastalert > 10)
|
||||
{
|
||||
log(LOG_WARNING, "NMI: power fail\n");
|
||||
sysbeep(TIMER_FREQ/880, hz);
|
||||
lastalert = time.tv_sec;
|
||||
lastalert = time_second;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.49 1998/03/15 13:35:42 kato Exp $
|
||||
* $Id: clock.c,v 1.50 1998/03/17 08:42:18 kato Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -270,6 +270,12 @@ clkintr(struct clockframe frame)
|
||||
if ((timer0_prescaler_count += timer0_max_count)
|
||||
>= hardclock_max_count) {
|
||||
timer0_prescaler_count -= hardclock_max_count;
|
||||
#ifdef FIXME
|
||||
/*
|
||||
* XXX: This magic doesn't work, but It shouldn't be
|
||||
* needed now anyway since we will not be able to
|
||||
* aquire the i8254 if it is used for timecounting.
|
||||
*/
|
||||
/*
|
||||
* See microtime.s for this magic.
|
||||
*/
|
||||
@ -293,6 +299,7 @@ clkintr(struct clockframe frame)
|
||||
#endif
|
||||
if (time.tv_usec >= 1000000)
|
||||
time.tv_usec -= 1000000;
|
||||
#endif
|
||||
hardclock(&frame);
|
||||
setdelayed();
|
||||
timer0_max_count = hardclock_max_count;
|
||||
@ -1096,7 +1103,7 @@ inittodr(time_t base)
|
||||
|
||||
sec += tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0);
|
||||
|
||||
y = time.tv_sec - sec;
|
||||
y = time_second - sec;
|
||||
if (y <= -2 || y >= 2) {
|
||||
/* badly off, adjust it */
|
||||
s = splclock();
|
||||
@ -1128,7 +1135,7 @@ resettodr()
|
||||
return;
|
||||
|
||||
s = splclock();
|
||||
tm = time.tv_sec;
|
||||
tm = time_second;
|
||||
splx(s);
|
||||
|
||||
#ifdef PC98
|
||||
|
Loading…
x
Reference in New Issue
Block a user