diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-08 00:45:12 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-08 00:45:12 +0000 |
commit | 89e1ae16f75923312bf487fd96ab74ce0211df73 (patch) | |
tree | 8b1a7c1b20231f33ac76361d3634b70b4c89d8d2 /pkg/tcpip/link/sharedmem/tx.go | |
parent | fd0024109aac305a161145ce219f936a0b61a0de (diff) | |
parent | e44b100654ca639d11221e547384f699e461296d (diff) |
Merge release-20210927.0-50-ge44b10065 (automated)
Diffstat (limited to 'pkg/tcpip/link/sharedmem/tx.go')
-rw-r--r-- | pkg/tcpip/link/sharedmem/tx.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/tcpip/link/sharedmem/tx.go b/pkg/tcpip/link/sharedmem/tx.go index 5ffcb8ab4..35e5bff12 100644 --- a/pkg/tcpip/link/sharedmem/tx.go +++ b/pkg/tcpip/link/sharedmem/tx.go @@ -18,6 +18,7 @@ import ( "math" "golang.org/x/sys/unix" + "gvisor.dev/gvisor/pkg/eventfd" "gvisor.dev/gvisor/pkg/tcpip/buffer" "gvisor.dev/gvisor/pkg/tcpip/link/sharedmem/queue" ) @@ -32,7 +33,7 @@ type tx struct { q queue.Tx ids idManager bufs bufferManager - eventFD int + eventFD eventfd.Eventfd sharedDataFD int } @@ -148,7 +149,7 @@ func (t *tx) transmit(bufs ...buffer.View) bool { // notify writes to the tx.eventFD to indicate to the peer that there is data to // be read. func (t *tx) notify() { - unix.Write(t.eventFD, []byte{1, 0, 0, 0, 0, 0, 0, 0}) + t.eventFD.Notify() } // getBuffer returns a memory region mapped to the full contents of the given |