bitkeeper revision 1.1159.113.3 (41723f7fO8wKQjhPjoowbDHAwaKf-g)

Always check shadow time values are up to date in time interrupt.
This commit is contained in:
kaf24@freefall.cl.cam.ac.uk committed 2004-10-17 09:46:39 +00:00
1 parent 2acc4cfee7
commit bf174cbbf4
2 files changed
+18 -14

No files matched your search

@@ -393,14 +393,17 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
unsigned long ticks = 0;
long sec_diff;
retry:
__get_time_values_from_xen();
do {
__get_time_values_from_xen();
delta = (s64)(shadow_system_time +
(__get_time_delta_usecs() * 1000) -
processed_system_time);
}
while ( !TIME_VALUES_UP_TO_DATE );
if ( (delta = (s64)(shadow_system_time + __get_time_delta_usecs() * 1000 -
processed_system_time)) < 0 )
if ( unlikely(delta < 0) )
{
if (!TIME_VALUES_UP_TO_DATE)
goto retry;
printk("Timer ISR: Time went backwards: %lld\n", delta);
return;
}
@@ -367,15 +367,16 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
s64 delta, nsec;
long sec_diff, wtm_nsec;
retry:
__get_time_values_from_xen();
do {
__get_time_values_from_xen();
delta = (s64)(shadow_system_time +
(cur_timer->get_offset() * NSEC_PER_USEC) -
processed_system_time);
if (delta < 0) {
if (!TIME_VALUES_UP_TO_DATE)
goto retry;
delta = (s64)(shadow_system_time +
(cur_timer->get_offset() * NSEC_PER_USEC) -
processed_system_time);
}
while (!TIME_VALUES_UP_TO_DATE);
if (unlikely(delta < 0)) {
printk("Timer ISR: Time went backwards: %lld %lld %ld %lld\n",
delta, shadow_system_time,
(cur_timer->get_offset() * NSEC_PER_USEC),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.