Changeset 5861b60 in mainline


Ignore:
Timestamp:
2024-01-15T15:15:14Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
a064d4f
Parents:
c7ceacf
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-03-12 15:06:58)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 15:15:14)
Message:

Lift actions that do not need separate context out of scheduler_separated_stack()

We're making scheduler_separated_stack() as simple as possible so that later
we can switch from thread to thread directly whenever we don't need to wait.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/scheduler.c

    rc7ceacf r5861b60  
    449449        THREAD->kcycles += get_cycle() - THREAD->last_cycle;
    450450
     451        after_thread_ran_arch();
     452
     453        if (new_state == Sleeping) {
     454                /* Prefer the thread after it's woken up. */
     455                THREAD->priority = -1;
     456        }
     457
    451458        if (!context_save(&THREAD->saved_context)) {
    452459                /*
     
    506513
    507514        if (THREAD) {
    508                 after_thread_ran_arch();
    509 
    510515                state_t state = THREAD->state;
    511 
    512                 if (state == Sleeping) {
    513                         /* Prefer the thread after it's woken up. */
    514                         THREAD->priority = -1;
    515                 }
    516 
    517516                irq_spinlock_unlock(&THREAD->lock, false);
    518517
Note: See TracChangeset for help on using the changeset viewer.