In linux, epoll, EPOLLHUP may happen even if no connection call is made. It
would confuse callers for what is actually happening.
Replaced is_connect_failed, and we detect if connection failed by using the
combination of is_err and is_interrupt, please see the example, tcp_client
HermitOS is a microkernel target aiming to provide a simple OS for
virtualized applications. It recently added support for the poll() and
eventfd() system calls, which means we can target it with our poll()
based backend.
Hermit does not have a traditional libc; instead it uses hermit-abi.
However rustix does not support using hermit-abi as its underlying
layer yet. So we have to build a shim layer until it does.
Closes#177
cc bytecodealliance/rustix#1012
Signed-off-by: John Nunley <dev@notgull.net>
If eventfd isn't initialized, `Polling::new` will fail with an EPERM
error. You need to call the "esp_vfs_eventfd_register" function to
initialize the eventfd subsystem in ESP-IDF. This commit indicates to
the user that this needs to happen.
Signed-off-by: John Nunley <dev@notgull.net>
* Add better documentation for the IOCP module
* Extract Events from Poller
This prevents the need to have an intermediate buffer to read events
from, reducing the need for an allocation and a copy. This is a breaking
change.
* Add event extra information
Foundation for more details later on.
* Add PRI and HUP events
* Fix various failing tests
- Make sure that waitable handles interact properly with the new
infrastructure
- Fix failing doctests
* Review comments
- Make set_* take a boolean for the value of the flag
- Make Events !Sync
- Fix visibility modifiers
- Inline more methods
- Use a better strategy for testing
* Move completion packets into the Events buffer
This removes one of the mutexes that we have to lock.
* Review comments
Signed-off-by: John Nunley <dev@notgull.net>
* Support for the ESP-IDF framework
* Restore the spans to work with the raw notify fd
* On Linux eventfd needs PollFlags::IN
* Add cargo check for ESP IDF to the CI
---------
Co-authored-by: imarkov <imarkov@vmware.com>