package fdnotifier
import "gvisor.dev/gvisor/pkg/fdnotifier"
Package fdnotifier contains an adapter that translates IO events (e.g., a file became readable/writable) from native FDs to the notifications in the waiter package. It uses epoll in edge-triggered mode to receive notifications for registered FDs.
Index ¶
- func AddFD(fd int32, queue *waiter.Queue) error
- func HasFD(fd int32) bool
- func NonBlockingPoll(fd int32, mask waiter.EventMask) waiter.EventMask
- func RemoveFD(fd int32)
- func UpdateFD(fd int32) error
Functions ¶
func AddFD ¶
AddFD adds an FD to the list of observed FDs.
func HasFD ¶
HasFD returns true if the FD is in the list of observed FDs.
This should only be used by tests to assert that FDs are correctly registered.
func NonBlockingPoll ¶
NonBlockingPoll polls the given FD in non-blocking fashion. It is used just to query the FD's current state.
func RemoveFD ¶
func RemoveFD(fd int32)
RemoveFD removes an FD from the list of observed FDs.
func UpdateFD ¶
UpdateFD updates the set of events the fd needs to be notified on.
Source Files ¶
fdnotifier.go poll_unsafe.go
- Version
- v0.0.0-20250605235530-a6711d1e1dc6 (latest)
- Published
- Jun 5, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 hours ago –
Tools for package owners.