Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/interrupt/interrupt.c

    r11909ce3 r4760793  
    114114
    115115        /* Account user cycles */
    116         if (THREAD)
     116        if (THREAD) {
     117                irq_spinlock_lock(&THREAD->lock, false);
    117118                thread_update_accounting(true);
     119                irq_spinlock_unlock(&THREAD->lock, false);
     120        }
    118121
    119122        /* Account CPU usage if it woke up from sleep */
     
    152155
    153156        /* Do not charge THREAD for exception cycles */
    154         if (THREAD)
     157        if (THREAD) {
     158                irq_spinlock_lock(&THREAD->lock, false);
    155159                THREAD->last_cycle = end_cycle;
     160                irq_spinlock_unlock(&THREAD->lock, false);
     161        }
    156162#else
    157163        panic("No space for any exception handler, yet we want to handle some exception.");
Note: See TracChangeset for help on using the changeset viewer.