Changeset 8cf8ee6 in mainline


Ignore:
Timestamp:
2006-05-30T21:52:25Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3de6dd7a
Parents:
ad37437
Message:

Project missed_clock_ticks also on thread timeslice and run queue relink counter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/time/clock.c

    rad37437 r8cf8ee6  
    125125        timeout_handler_t f;
    126126        void *arg;
     127        count_t missed_clock_ticks = CPU->missed_clock_ticks;
    127128        int i;
    128129
     
    131132         * run all expired timeouts as you visit them.
    132133         */
    133         for (i = 0; i <= CPU->missed_clock_ticks; i++) {
     134        for (i = 0; i <= missed_clock_ticks; i++) {
    134135                clock_update_counters();
    135136                spinlock_lock(&CPU->timeoutlock);
     
    164165               
    165166                spinlock_lock(&CPU->lock);
    166                 CPU->needs_relink++;
     167                CPU->needs_relink += 1 + missed_clock_ticks;
    167168                spinlock_unlock(&CPU->lock);   
    168169       
    169170                spinlock_lock(&THREAD->lock);
    170                 if ((ticks = THREAD->ticks))
    171                         THREAD->ticks--;
     171                if ((ticks = THREAD->ticks)) {
     172                        if (ticks >= 1 + missed_clock_ticks)
     173                                THREAD->ticks -= 1 + missed_clock_ticks;
     174                        else
     175                                THREAD->ticks = 0;
     176                }
    172177                spinlock_unlock(&THREAD->lock);
    173178               
Note: See TracChangeset for help on using the changeset viewer.