Ignore:
File:
1 edited

Legend:

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

    r0d21b53 rcd98e594  
    5151#include <print.h>
    5252#include <symtab.h>
     53#include <proc/thread.h>
    5354
    5455static struct {
     
    9192        ASSERT(n < IVT_ITEMS);
    9293
     94        /* Account user cycles */
     95        if (THREAD) {
     96                spinlock_lock(&THREAD->lock);
     97                thread_update_accounting(true);
     98                spinlock_unlock(&THREAD->lock);
     99        }
     100
    93101#ifdef CONFIG_UDEBUG
    94102        if (THREAD) THREAD->udebug.uspace_state = istate;
     
    104112        if (THREAD && THREAD->interrupted && istate_from_uspace(istate))
    105113                thread_exit();
     114
     115        if (THREAD) {
     116                spinlock_lock(&THREAD->lock);
     117                thread_update_accounting(false);
     118                spinlock_unlock(&THREAD->lock);
     119        }
    106120}
    107121
     
    114128
    115129/** Terminate thread and task if exception came from userspace. */
    116 void fault_if_from_uspace(istate_t *istate, char *fmt, ...)
     130void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)
    117131{
    118132        task_t *task = TASK;
     
    162176#if (IVT_ITEMS > 0)
    163177        unsigned int i;
    164         char *symbol;
    165178
    166179        spinlock_lock(&exctbl_lock);
     
    177190       
    178191        for (i = 0; i < IVT_ITEMS; i++) {
    179                 symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f);
     192                const char *symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f);
    180193
    181194#ifdef __32_BITS__
Note: See TracChangeset for help on using the changeset viewer.