Changeset dd218ea in mainline


Ignore:
Timestamp:
2023-04-15T16:30:15Z (14 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b2ec5cf
Parents:
c680333
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-03-28 16:12:16)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-04-15 16:30:15)
Message:

Remove unnecessary thread_t::wired

There's already thread_t::nomigrate doing the same thing

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/thread.h

    rc680333 rdd218ea  
    149149        /** Containing task. */
    150150        task_t *task;
    151         /** Thread is wired to CPU. */
    152         bool wired;
    153151        /** Thread was migrated to another CPU and has not run yet. */
    154152        bool stolen;
  • kernel/generic/src/proc/scheduler.c

    rc680333 rdd218ea  
    589589                                irq_spinlock_lock(&thread->lock, false);
    590590
    591                                 if ((!thread->wired) && (!thread->stolen) &&
     591                                if ((!thread->stolen) &&
    592592                                    (!thread->nomigrate) &&
    593593                                    (!thread->fpu_context_engaged)) {
  • kernel/generic/src/proc/thread.c

    rc680333 rdd218ea  
    231231        irq_spinlock_lock(&thread->lock, true);
    232232        thread->cpu = cpu;
    233         thread->wired = true;
     233        thread->nomigrate++;
    234234        irq_spinlock_unlock(&thread->lock, true);
    235235}
     
    260260
    261261        cpu_t *cpu;
    262         if (thread->wired || thread->nomigrate || thread->fpu_context_engaged) {
     262        if (thread->nomigrate || thread->fpu_context_engaged) {
    263263                /* Cannot ready to another CPU */
    264264                assert(thread->cpu != NULL);
     
    348348        thread->priority = -1;          /* Start in rq[0] */
    349349        thread->cpu = NULL;
    350         thread->wired = false;
    351350        thread->stolen = false;
    352351        thread->uspace =
Note: See TracChangeset for help on using the changeset viewer.