> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 21:37:14 up 6 days, 16:42, 1 user, load average: 0.50, 0.61, 0.63
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
void do_syscall(Context *c);
|
||||
static Context* do_event(Event e, Context* c) {
|
||||
switch (e.event) {
|
||||
case EVENT_YIELD: Log("EVENT_YIELD\n"); break;
|
||||
case EVENT_YIELD: printf("EVENT_YIELD\n"); break;
|
||||
case EVENT_SYSCALL: do_syscall(c); break;
|
||||
default: panic("Unhandled event ID = %d", e.event);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ void do_syscall(Context *c) {
|
||||
a[2] = c->GPR3;
|
||||
a[3] = c->GPR4;
|
||||
|
||||
Log("syscall %d: %s\n", a[0], __syscall_names[a[0]]);
|
||||
printf("syscall %d: %s\n", a[0], __syscall_names[a[0]]);
|
||||
switch (a[0]) {
|
||||
case SYS_yield: yield(); break;
|
||||
case SYS_exit: halt(0); break;
|
||||
|
Reference in New Issue
Block a user