-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid calling
poll_oneoff
with zero subscriptions. (#162)
* Avoid calling `poll_oneoff` with zero subscriptions. With WebAssembly/WASI#193 merged, WASI is moving to make `poll_oneoff` with no arguments an error. Even though that's in ephemeral and not yet in a snapshot, we can start to anticipate it in libc: - Remove the `pause` function, since WASI has no signals and thus no way to ever wake it up short of having the host terminate it. - Make `poll` and `pselect` return `ENOTSUP` in the case of having no events to wait for. * Remove `pause` from the defined-symbols.txt list. * Fix __wasilibc_unmodified_upstream markers. * Check for zero subscriptions, rather than zero events. Make `poll` and `pselect` return `ENOTSUP` when asked to poll on zero subscriptions, rather than when the systerm returns zero events. While here, drop the `__wasilibc_unmodified_upstream` markers, which were already pretty noisy here, and would be significantly worse with this change. * Add comments about the subtle relationship between nfds and nsubscriptions. * Rewrite the comment. * Fix code quotes.
- Loading branch information
1 parent
753cc43
commit 5a7ba74
Showing
5 changed files
with
42 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -805,7 +805,6 @@ optind | |
optopt | ||
optreset | ||
pathconf | ||
pause | ||
perror | ||
poll | ||
posix_close | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters