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
|
|
@ -56,7 +56,7 @@ static uint32_t syscall(uint32_t id, uint32_t param1, uint32_t param2) {
|
|||
#define millis() syscall_cast(UVM32_SYSCALL_MILLIS, 0, 0)
|
||||
#define putc(x) syscall_cast(UVM32_SYSCALL_PUTC, x, 0)
|
||||
#define getc() syscall_cast(UVM32_SYSCALL_GETC, 0, 0)
|
||||
#define yield() syscall_cast(UVM32_SYSCALL_YIELD, 0, 0)
|
||||
#define yield(x) syscall_cast(UVM32_SYSCALL_YIELD, x, 0)
|
||||
#define printbuf(x, y) syscall_cast(UVM32_SYSCALL_PRINTBUF, x, y)
|
||||
|
||||
extern char _estack;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue