mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add POLLRDNORM/POLLWRNORM support.
On Linux these are meant to be equivalent to POLLIN/POLLOUT. Rather than hack these on in sys_poll etc it felt cleaner to just cleanup the call sites to notify for both events. This is what linux does as well. Fixes #5544 PiperOrigin-RevId: 364859977
This commit is contained in:
committed by
gVisor bot
parent
72ff6a1cac
commit
e7ca2a51a8
@@ -192,7 +192,7 @@ func (c *ConnectedEndpoint) Writable() bool {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
return fdnotifier.NonBlockingPoll(int32(c.fd), waiter.EventOut)&waiter.EventOut != 0
|
||||
return fdnotifier.NonBlockingPoll(int32(c.fd), waiter.WritableEvents)&waiter.WritableEvents != 0
|
||||
}
|
||||
|
||||
// Passcred implements transport.ConnectedEndpoint.Passcred.
|
||||
@@ -282,7 +282,7 @@ func (c *ConnectedEndpoint) Readable() bool {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
return fdnotifier.NonBlockingPoll(int32(c.fd), waiter.EventIn)&waiter.EventIn != 0
|
||||
return fdnotifier.NonBlockingPoll(int32(c.fd), waiter.ReadableEvents)&waiter.ReadableEvents != 0
|
||||
}
|
||||
|
||||
// SendQueuedSize implements transport.Receiver.SendQueuedSize.
|
||||
|
||||
Reference in New Issue
Block a user