mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Remove a warning in DELAY about large delays. In kern_shutdown.c
we use excessive delays quite habitually.
This commit is contained in:
parent
8dc9b4cf04
commit
1c56376494
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200739
|
@ -197,15 +197,8 @@ DELAY(int n)
|
|||
{
|
||||
u_quad_t start, end, now;
|
||||
|
||||
#define USECS_IN_SEC 1000000ULL
|
||||
|
||||
if (n > USECS_IN_SEC) {
|
||||
printf("WARNING: %s(%d) called from %p", __func__, n,
|
||||
__builtin_return_address(0));
|
||||
}
|
||||
|
||||
start = mftb();
|
||||
end = start + (u_quad_t)ticks_per_sec / (USECS_IN_SEC / n);
|
||||
end = start + (u_quad_t)ticks_per_sec / (1000000ULL / n);
|
||||
do {
|
||||
now = mftb();
|
||||
} while (now < end || (now > start && end < start));
|
||||
|
|
Loading…
Reference in a new issue