Ignore:
File:
1 edited

Legend:

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

    r5e984f2 r2fa10f6  
    5959    unative_t a4, unative_t a5, unative_t a6, unative_t id)
    6060{
    61         unative_t rc;
    62         ipl_t ipl;
    63 
    6461        /* Do userpace accounting */
    65         ipl = interrupts_disable();
    66         spinlock_lock(&THREAD->lock);
     62        irq_spinlock_lock(&THREAD->lock, true);
    6763        thread_update_accounting(true);
    68         spinlock_unlock(&THREAD->lock);
    69         interrupts_restore(ipl);
    70 
     64        irq_spinlock_unlock(&THREAD->lock, true);
     65       
    7166#ifdef CONFIG_UDEBUG
    7267        /*
    7368         * Early check for undebugged tasks. We do not lock anything as this
    7469         * test need not be precise in either direction.
     70         *
    7571         */
    76         if (THREAD->udebug.active) {
     72        if (THREAD->udebug.active)
    7773                udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
    78         }
    7974#endif
    8075       
     76        unative_t rc;
    8177        if (id < SYSCALL_END) {
    8278                rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
     
    9389        if (THREAD->udebug.active) {
    9490                udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
    95        
     91               
    9692                /*
    9793                 * Stopping point needed for tasks that only invoke
     
    10399        }
    104100#endif
    105 
     101       
    106102        /* Do kernel accounting */
    107         ipl = interrupts_disable();
    108         spinlock_lock(&THREAD->lock);
     103        irq_spinlock_lock(&THREAD->lock, true);
    109104        thread_update_accounting(false);
    110         spinlock_unlock(&THREAD->lock);
    111         interrupts_restore(ipl);
     105        irq_spinlock_unlock(&THREAD->lock, true);
    112106       
    113107        return rc;
     
    165159        (syshandler_t) sys_physmem_map,
    166160        (syshandler_t) sys_iospace_enable,
    167         (syshandler_t) sys_preempt_control,
    168161       
    169162        /* Sysinfo syscalls */
Note: See TracChangeset for help on using the changeset viewer.