summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix/transport/connectionless.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-10-17 15:09:26 -0700
committerShentubot <shentubot@google.com>2018-10-17 15:10:20 -0700
commit6922eee6499212a009fdc254224f916bd1c46f29 (patch)
treef7748528b4d491a0d686f88e9cc2256607135c81 /pkg/sentry/socket/unix/transport/connectionless.go
parente4277cb6ff2d1921e9e7f6fac309647e544bbc04 (diff)
Merge queue into Unix transport
This queue only has a single user, so there is no need for it to use an interface. Merging it into the same package as its sole user allows us to avoid a circular dependency. This simplifies the code and should slightly improve performance. PiperOrigin-RevId: 217595889 Change-Id: Iabbd5164240b935f79933618c61581bc8dcd2822
Diffstat (limited to 'pkg/sentry/socket/unix/transport/connectionless.go')
-rw-r--r--pkg/sentry/socket/unix/transport/connectionless.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/sentry/socket/unix/transport/connectionless.go b/pkg/sentry/socket/unix/transport/connectionless.go
index fb2728010..86cd05199 100644
--- a/pkg/sentry/socket/unix/transport/connectionless.go
+++ b/pkg/sentry/socket/unix/transport/connectionless.go
@@ -15,7 +15,6 @@
package transport
import (
- "gvisor.googlesource.com/gvisor/pkg/sentry/socket/unix/transport/queue"
"gvisor.googlesource.com/gvisor/pkg/tcpip"
"gvisor.googlesource.com/gvisor/pkg/waiter"
)
@@ -34,7 +33,7 @@ type connectionlessEndpoint struct {
// NewConnectionless creates a new unbound dgram endpoint.
func NewConnectionless() Endpoint {
ep := &connectionlessEndpoint{baseEndpoint{Queue: &waiter.Queue{}}}
- ep.receiver = &queueReceiver{readQueue: queue.New(&waiter.Queue{}, ep.Queue, initialLimit)}
+ ep.receiver = &queueReceiver{readQueue: newQueue(&waiter.Queue{}, ep.Queue, initialLimit)}
return ep
}