Changeset 11909ce3 in mainline for kernel/generic/src/proc/task.c


Ignore:
Timestamp:
2024-01-21T15:48:43Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
515f1b1
Parents:
33e15a0
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-03-29 10:25:36)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-21 15:48:43)
Message:

Make thread cycle statistics atomic

File:
1 edited

Legend:

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

    r33e15a0 r11909ce3  
    506506        /* Current values of threads */
    507507        list_foreach(task->threads, th_link, thread_t, thread) {
    508                 irq_spinlock_lock(&thread->lock, false);
    509 
    510508                /* Process only counted threads */
    511509                if (!thread->uncounted) {
     
    515513                        }
    516514
    517                         uret += thread->ucycles;
    518                         kret += thread->kcycles;
     515                        uret += atomic_time_read(&thread->ucycles);
     516                        kret += atomic_time_read(&thread->kcycles);
    519517                }
    520 
    521                 irq_spinlock_unlock(&thread->lock, false);
    522518        }
    523519
Note: See TracChangeset for help on using the changeset viewer.