MFi386: revision 1.204.

This commit is contained in:
Yoshihiro Takahashi 2003-09-11 14:05:06 +00:00
parent 0fbd709bd5
commit 916a70c619
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119987
3 changed files with 54 additions and 6 deletions

View File

@ -299,8 +299,18 @@ DELAY(int n)
* takes about 1.5 usec for each of the i/o's in getit(). The loop
* takes about 6 usec on a 486/33 and 13 usec on a 386/20. The
* multiplications and divisions to scale the count take a while).
*
* However, if ddb is active then use a fake counter since reading
* the i8254 counter involves acquiring a lock. ddb must not go
* locking for many reasons, but it calls here for at least atkbd
* input.
*/
prev_tick = getit();
#ifdef DDB
if (db_active)
prev_tick = 0;
else
#endif
prev_tick = getit();
n -= 0; /* XXX actually guess no initial overhead */
/*
* Calculate (n * (timer_freq / 1e6)) without using floating point
@ -327,7 +337,13 @@ DELAY(int n)
/ 1000000;
while (ticks_left > 0) {
tick = getit();
#ifdef DDB
if (db_active) {
outb(0x5f, 0);
tick = prev_tick + 1;
} else
#endif
tick = getit();
#ifdef DELAYDEBUG
++getit_calls;
#endif

View File

@ -299,8 +299,18 @@ DELAY(int n)
* takes about 1.5 usec for each of the i/o's in getit(). The loop
* takes about 6 usec on a 486/33 and 13 usec on a 386/20. The
* multiplications and divisions to scale the count take a while).
*
* However, if ddb is active then use a fake counter since reading
* the i8254 counter involves acquiring a lock. ddb must not go
* locking for many reasons, but it calls here for at least atkbd
* input.
*/
prev_tick = getit();
#ifdef DDB
if (db_active)
prev_tick = 0;
else
#endif
prev_tick = getit();
n -= 0; /* XXX actually guess no initial overhead */
/*
* Calculate (n * (timer_freq / 1e6)) without using floating point
@ -327,7 +337,13 @@ DELAY(int n)
/ 1000000;
while (ticks_left > 0) {
tick = getit();
#ifdef DDB
if (db_active) {
outb(0x5f, 0);
tick = prev_tick + 1;
} else
#endif
tick = getit();
#ifdef DELAYDEBUG
++getit_calls;
#endif

View File

@ -299,8 +299,18 @@ DELAY(int n)
* takes about 1.5 usec for each of the i/o's in getit(). The loop
* takes about 6 usec on a 486/33 and 13 usec on a 386/20. The
* multiplications and divisions to scale the count take a while).
*
* However, if ddb is active then use a fake counter since reading
* the i8254 counter involves acquiring a lock. ddb must not go
* locking for many reasons, but it calls here for at least atkbd
* input.
*/
prev_tick = getit();
#ifdef DDB
if (db_active)
prev_tick = 0;
else
#endif
prev_tick = getit();
n -= 0; /* XXX actually guess no initial overhead */
/*
* Calculate (n * (timer_freq / 1e6)) without using floating point
@ -327,7 +337,13 @@ DELAY(int n)
/ 1000000;
while (ticks_left > 0) {
tick = getit();
#ifdef DDB
if (db_active) {
outb(0x5f, 0);
tick = prev_tick + 1;
} else
#endif
tick = getit();
#ifdef DELAYDEBUG
++getit_calls;
#endif