diff options
Diffstat (limited to 'pkg/fdnotifier/fdnotifier.go')
-rw-r--r-- | pkg/fdnotifier/fdnotifier.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/fdnotifier/fdnotifier.go b/pkg/fdnotifier/fdnotifier.go index 624b1a0c5..aa4906ca0 100644 --- a/pkg/fdnotifier/fdnotifier.go +++ b/pkg/fdnotifier/fdnotifier.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build linux + // 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 @@ -70,7 +72,7 @@ func (n *notifier) waitFD(fd int32, fi *fdInfo, mask waiter.EventMask) error { } e := syscall.EpollEvent{ - Events: uint32(mask) | -syscall.EPOLLET, + Events: mask.ToLinux() | -syscall.EPOLLET, Fd: fd, } @@ -155,7 +157,7 @@ func (n *notifier) waitAndNotify() error { n.mu.Lock() for i := 0; i < v; i++ { if fi, ok := n.fdMap[e[i].Fd]; ok { - fi.queue.Notify(waiter.EventMask(e[i].Events)) + fi.queue.Notify(waiter.EventMaskFromLinux(e[i].Events)) } } n.mu.Unlock() |