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
@@ -69,7 +69,7 @@ func (q *queue) readReadiness(t *linux.KernelTermios) waiter.EventMask {
|
||||
q.mu.Lock()
|
||||
defer q.mu.Unlock()
|
||||
if len(q.readBuf) > 0 && q.readable {
|
||||
return waiter.EventIn
|
||||
return waiter.ReadableEvents
|
||||
}
|
||||
return waiter.EventMask(0)
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func (q *queue) writeReadiness(t *linux.KernelTermios) waiter.EventMask {
|
||||
q.mu.Lock()
|
||||
defer q.mu.Unlock()
|
||||
if q.waitBufLen < waitBufMaxBytes {
|
||||
return waiter.EventOut
|
||||
return waiter.WritableEvents
|
||||
}
|
||||
return waiter.EventMask(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user