Changeset 3d84734 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2024-01-20T17:19:52Z (17 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
41bfc64
Parents:
efed95a3
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 17:18:35)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 17:19:52)
Message:

Make thread→priority weakly atomic to avoid need for locking

File:
1 edited

Legend:

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

    refed95a3 r3d84734  
    262262        thread->uncounted =
    263263            ((flags & THREAD_FLAG_UNCOUNTED) == THREAD_FLAG_UNCOUNTED);
    264         thread->priority = -1;          /* Start in rq[0] */
     264        atomic_init(&thread->priority, -1);          /* Start in rq[0] */
    265265        atomic_init(&thread->cpu, NULL);
    266266        thread->stolen = false;
Note: See TracChangeset for help on using the changeset viewer.