Changeset 41bfc64 in mainline for kernel/generic/src/sysinfo/stats.c


Ignore:
Timestamp:
2024-01-20T17:24:56Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
7364e2d1
Parents:
3d84734
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 16:23:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-20 17:24:56)
Message:

Make thread→state weakly atomic so we don't need to hold thread lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    r3d84734 r41bfc64  
    303303        stats_thread->thread_id = thread->tid;
    304304        stats_thread->task_id = thread->task->taskid;
    305         stats_thread->state = thread->state;
     305        stats_thread->state = atomic_get_unordered(&thread->state);
    306306        stats_thread->priority = atomic_get_unordered(&thread->priority);
    307307        stats_thread->ucycles = thread->ucycles;
Note: See TracChangeset for help on using the changeset viewer.