From 84063e88c382748d6990eb24834c0553d530d517 Mon Sep 17 00:00:00 2001 From: Bhasker Hariharan Date: Tue, 5 Oct 2021 15:39:50 -0700 Subject: Add server implementation for sharedmem endpoints. PiperOrigin-RevId: 401088040 --- pkg/tcpip/link/sharedmem/rx.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/tcpip/link/sharedmem/rx.go') diff --git a/pkg/tcpip/link/sharedmem/rx.go b/pkg/tcpip/link/sharedmem/rx.go index e882a128c..399317335 100644 --- a/pkg/tcpip/link/sharedmem/rx.go +++ b/pkg/tcpip/link/sharedmem/rx.go @@ -108,6 +108,12 @@ func (r *rx) cleanup() { unix.Close(r.eventFD) } +// notify writes to the tx.eventFD to indicate to the peer that there is data to +// be read. +func (r *rx) notify() { + unix.Write(r.eventFD, []byte{1, 0, 0, 0, 0, 0, 0, 0}) +} + // postAndReceive posts the provided buffers (if any), and then tries to read // from the receive queue. // -- cgit v1.2.3