• Tom Barbette's avatar
    click jiffies: Accumuate jiffies instead of using time · 360d8f49
    Tom Barbette authored
    In userlevel, getting the time will always be costly. So we
    do like the kernel do : accumulate jiffies at a certain rate.
    
    During initialization, the time is still used.
    
    When the task of JiffieClock runs, it will set the jiffie function to
    its own, which simply returns the accumulated counter.
    
    Initially, main thread or the one you assigned with StaticThreadSched
    is responsible for accumulation. But if jiffies are missing 2 ticks,
    we'll try other threads until we loop back to
    the main one. At that point the accumulated jiffies won't be used
    anymore.
    The solution in that case would be to keep one thread with lighter tasks.
    
    Change-Id: Ifc46601b53c98a5936ecae72010bde5fab15143f
    360d8f49
config.h.in 10.5 KB