am,x86-nemu,asye: enable interrupt in user prog

This commit is contained in:
Zihao Yu 2017-08-04 22:47:47 +08:00
parent 6d2bc81df2
commit bb1423fb4d
1 changed files with 2 additions and 8 deletions

View File

@ -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;
}