Changeset e2fcdb1 in mainline


Ignore:
Timestamp:
2010-05-09T18:36:12Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c6f0e3a2
Parents:
4039c77 (diff), cd98e594 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge fix for ticket #232.

Location:
kernel/generic/src
Files:
2 edited

Legend:

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

    r4039c77 re2fcdb1  
    9393
    9494        /* Account user cycles */
    95         if (THREAD)
     95        if (THREAD) {
     96                spinlock_lock(&THREAD->lock);
    9697                thread_update_accounting(true);
     98                spinlock_unlock(&THREAD->lock);
     99        }
    97100
    98101#ifdef CONFIG_UDEBUG
     
    110113                thread_exit();
    111114
    112         if (THREAD)
     115        if (THREAD) {
     116                spinlock_lock(&THREAD->lock);
    113117                thread_update_accounting(false);
     118                spinlock_unlock(&THREAD->lock);
     119        }
    114120}
    115121
  • kernel/generic/src/syscall/syscall.c

    r4039c77 re2fcdb1  
    6060{
    6161        unative_t rc;
     62        ipl_t ipl;
    6263
    6364        /* Do userpace accounting */
     65        ipl = interrupts_disable();
     66        spinlock_lock(&THREAD->lock);
    6467        thread_update_accounting(true);
     68        spinlock_unlock(&THREAD->lock);
     69        interrupts_restore(ipl);
    6570
    6671#ifdef CONFIG_UDEBUG
     
    100105
    101106        /* Do kernel accounting */
     107        (void) interrupts_disable();
     108        spinlock_lock(&THREAD->lock);
    102109        thread_update_accounting(false);
     110        spinlock_unlock(&THREAD->lock);
     111        interrupts_restore(ipl);
    103112       
    104113        return rc;
Note: See TracChangeset for help on using the changeset viewer.