Add epoll and do more release readiness changes

This change also pays off some of the remaining technical debt with
stdio, file descriptors, and memory managemnt polyfills.
This commit is contained in:
Justine Tunney 2020-11-28 12:01:51 -08:00
parent a9ea949df8
commit 3e4fd4b0ad
271 changed files with 5706 additions and 1365 deletions

View file

@ -28,7 +28,7 @@ textwindows int64_t winsockblock(int64_t fh, unsigned eventbit, int64_t rc) {
int64_t eh;
struct NtWsaNetworkEvents ev;
if (rc != -1) return rc;
if (WSAGetLastError() != EWOULDBLOCK) return winsockerr();
if (WSAGetLastError() != EWOULDBLOCK) return __winsockerr();
eh = WSACreateEvent();
memset(&ev, 0, sizeof(ev));
if (WSAEventSelect(fh, eh, 1u << eventbit) != -1 &&
@ -39,7 +39,7 @@ textwindows int64_t winsockblock(int64_t fh, unsigned eventbit, int64_t rc) {
errno = ev.iErrorCode[eventbit];
}
} else {
winsockerr();
__winsockerr();
}
WSACloseEvent(eh);
return rc;