Changeset 25939997 in mainline for kernel/generic/src/time/clock.c


Ignore:
Timestamp:
2024-01-19T16:21:20Z (10 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
c1eaec4
Parents:
1c1767f
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-04-16 19:36:25)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-19 16:21:20)
Message:

Make separate-stack-scheduler a loop with persistent context

We can see scheduler as a looping idle thread in which a thread
is repeatedly retrieved from a queue, prepared, switched to,
returned from, and cleaned up after.

IMO this is a more natural view of the process.

File:
1 edited

Legend:

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

    r1c1767f r25939997  
    123123static void cpu_update_accounting(void)
    124124{
     125        // FIXME: get_cycle() is unimplemented on several platforms
    125126        uint64_t now = get_cycle();
    126127        atomic_time_increment(&CPU->busy_cycles, now - CPU_LOCAL->last_cycle);
Note: See TracChangeset for help on using the changeset viewer.