Subversion Repositories HelenOS-historic

Compare Revisions

Regard whitespace Rev 1431 → Rev 1430

/kernel/trunk/generic/include/cpu.h
61,11 → 61,6
SPINLOCK_DECLARE(timeoutlock);
link_t timeout_active_head;
 
count_t missed_clock_ticks; /**< When system clock loses a tick, it is recorded here
so that clock() can react. This variable is
CPU-local and can be only accessed when interrupts
are disabled. */
 
/**
* Processor ID assigned by kernel.
*/
/kernel/trunk/generic/src/time/clock.c
62,13 → 62,11
timeout_t *h;
timeout_handler_t f;
void *arg;
int i;
 
/*
* To avoid lock ordering problems,
* run all expired timeouts as you visit them.
*/
for (i = 0; i < CPU->missed_clock_ticks; i++) {
spinlock_lock(&CPU->timeoutlock);
while ((l = CPU->timeout_active_head.next) != &CPU->timeout_active_head) {
h = list_get_instance(l, timeout_t, link);
89,8 → 87,6
spinlock_lock(&CPU->timeoutlock);
}
spinlock_unlock(&CPU->timeoutlock);
}
CPU->missed_clock_ticks = 0;
 
/*
* Do CPU usage accounting and find out whether to preempt THREAD.