Subversion Repositories HelenOS-historic

Rev

Rev 1431 | Rev 1434 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1431 Rev 1433
Line 66... Line 66...
66
 
66
 
67
    /*
67
    /*
68
     * To avoid lock ordering problems,
68
     * To avoid lock ordering problems,
69
     * run all expired timeouts as you visit them.
69
     * run all expired timeouts as you visit them.
70
     */
70
     */
71
    for (i = 0; i < CPU->missed_clock_ticks; i++) {
71
    for (i = 0; i <= CPU->missed_clock_ticks; i++) {
72
        spinlock_lock(&CPU->timeoutlock);
72
        spinlock_lock(&CPU->timeoutlock);
73
        while ((l = CPU->timeout_active_head.next) != &CPU->timeout_active_head) {
73
        while ((l = CPU->timeout_active_head.next) != &CPU->timeout_active_head) {
74
            h = list_get_instance(l, timeout_t, link);
74
            h = list_get_instance(l, timeout_t, link);
75
            spinlock_lock(&h->lock);
75
            spinlock_lock(&h->lock);
76
            if (h->ticks-- != 0) {
76
            if (h->ticks-- != 0) {