am,x86-nemu,asye: enable interrupt in user prog
This commit is contained in:
parent
6d2bc81df2
commit
bb1423fb4d
|
@ -66,7 +66,7 @@ _RegSet *_make(_Area stack, void *entry, void *arg) {
|
|||
r->esp = (uintptr_t)r;
|
||||
r->cs = 0x8;
|
||||
r->eip = (uintptr_t)entry;
|
||||
r->eflags = 0;
|
||||
r->eflags = 0x2 | FL_IF;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -75,11 +75,5 @@ void _trap() {
|
|||
}
|
||||
|
||||
int _istatus(int enable) {
|
||||
int ret = (get_efl() & FL_IF) != 0;
|
||||
if (enable) {
|
||||
sti();
|
||||
} else {
|
||||
cli();
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue