File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -938,8 +938,15 @@ Word wasi_unstable_sched_yield() {
938
938
// __wasi_errno_t __wasi_poll_oneoff(const __wasi_subscription_t *in, __wasi_event_t *out,
939
939
// __wasi_size_t nsubscriptions, __wasi_size_t *nevents)
940
940
Word wasi_unstable_poll_oneoff (Word /* in*/ , Word /* out*/ , Word /* nsubscriptions*/ ,
941
- Word /* nevents_ptr*/ ) {
942
- return 52 ; // __WASI_ERRNO_ENOSYS
941
+ Word nevents_ptr) {
942
+ auto *context = contextOrEffectiveContext ();
943
+
944
+ // Since we are not performing event polling, directly set nevents to 0
945
+ if (!context->wasmVm ()->setWord (nevents_ptr, Word (0 ))) {
946
+ return 21 ; // __WASI_EFAULT - If there is a failure setting memory
947
+ }
948
+
949
+ return 0 ; // __WASI_ESUCCESS
943
950
}
944
951
945
952
// void __wasi_proc_exit(__wasi_exitcode_t rval);
You can’t perform that action at this time.
0 commit comments