mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
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:
parent
d52baca7b2
commit
e07eeab043
14 changed files with 88 additions and 24 deletions
|
|
@ -81,6 +81,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_PRINTLN: {
|
||||
const char *str = uvm32_getcstr(&vmst[scheduler_index], &evt, ARG0);
|
||||
if (str[0] != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue