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


Ignore:
Timestamp:
2024-01-21T16:23:19Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
d23712e
Parents:
a3d87b9
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-03-28 17:40:43)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-21 16:23:19)
Message:

Thread lock is no longer necessary

File:
1 edited

Legend:

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

    ra3d87b9 rdfa4be62  
    362362        thread_t *thread = thread_first();
    363363        while (thread != NULL) {
    364                 /* Interrupts are already disabled */
    365                 irq_spinlock_lock(&thread->lock, false);
    366 
    367364                /* Record the statistics and increment the index */
    368365                produce_stats_thread(thread, &stats_threads[i]);
    369366                i++;
    370 
    371                 irq_spinlock_unlock(&thread->lock, false);
    372367
    373368                thread = thread_next(thread);
     
    625620                ret.data.size = sizeof(stats_thread_t);
    626621
    627                 /*
    628                  * Replaced hand-over-hand locking with regular nested sections
    629                  * to avoid weak reference leak issues.
    630                  */
    631                 irq_spinlock_lock(&thread->lock, false);
    632622                produce_stats_thread(thread, stats_thread);
    633                 irq_spinlock_unlock(&thread->lock, false);
    634623
    635624                irq_spinlock_unlock(&threads_lock, true);
Note: See TracChangeset for help on using the changeset viewer.