Make yield a regular syscall taking an argument.

Allows "wait for interrupt"/"wait for event" type operation where VM code blocks until the host has something for it.
This commit is contained in:
Toby Jaffey 2025-12-10 10:35:18 +00:00
parent d52baca7b2
commit e07eeab043
14 changed files with 88 additions and 24 deletions

View file

@ -47,6 +47,8 @@ int main(int argc, char *argv[]) {
break;
case UVM32_EVT_SYSCALL: // vm has paused to handle UVM32_SYSCALL
switch(evt.data.syscall.code) {
case UVM32_SYSCALL_YIELD:
break;
case UVM32_SYSCALL_PUTC:
printf("%c", uvm32_getval(&vmst, &evt, ARG0));
break;