Subversion Repositories HelenOS-historic

Rev

Rev 852 | Rev 958 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 852 Rev 955
Line 131... Line 131...
131
 
131
 
132
#include <debug.h>
132
#include <debug.h>
133
/** Handle syscall userspace call */
133
/** Handle syscall userspace call */
134
static void syscall_exception(int n, struct exception_regdump *pstate)
134
static void syscall_exception(int n, struct exception_regdump *pstate)
135
{
135
{
-
 
136
    interrupts_enable();
136
    if (pstate->a3 < SYSCALL_END)
137
    if (pstate->a3 < SYSCALL_END)
137
        pstate->v0 = syscall_table[pstate->a3](pstate->a0,
138
        pstate->v0 = syscall_table[pstate->a3](pstate->a0,
138
                               pstate->a1,
139
                               pstate->a1,
139
                               pstate->a2);
140
                               pstate->a2);
140
    else
141
    else
141
        panic("Undefined syscall %d", pstate->a3);
142
        panic("Undefined syscall %d", pstate->a3);
-
 
143
    interrupts_disable();
142
    pstate->epc += 4;
144
    pstate->epc += 4;
143
}
145
}
144
 
146
 
145
 
147
 
146
void exception(struct exception_regdump *pstate)
148
void exception(struct exception_regdump *pstate)