Skip to content

Commit 4742214

Browse files
committed
Implement pause.
1 parent 1f06bec commit 4742214

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

expected/wasm32-wasi/defined-symbols.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ optind
785785
optopt
786786
optreset
787787
pathconf
788+
pause
788789
perror
789790
poll
790791
posix_fadvise

libc-bottom-half/sources/pause.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <unistd.h>
2+
#include <wasi.h>
3+
4+
int pause(void) {
5+
size_t n;
6+
(void)__wasi_poll_oneoff(0, 0, 0, &n);
7+
}

0 commit comments

Comments
 (0)