MCPcopy Index your code
hub / github.com/google/gvisor / DeleteSocket

Method DeleteSocket

pkg/sentry/kernel/kernel.go:1988–1992  ·  view source on GitHub ↗

DeleteSocket removes a socket from the system-wide socket table.

(sock *vfs.FileDescription)

Source from the content-addressed store, hash-verified

1986
1987// DeleteSocket removes a socket from the system-wide socket table.
1988func (k *Kernel) DeleteSocket(sock *vfs.FileDescription) {
1989 k.extMu.Lock()
1990 delete(k.sockets, sock)
1991 k.extMu.Unlock()
1992}
1993
1994// ListSockets returns a snapshot of all sockets.
1995//

Callers 5

DecRefMethod · 0.80
ReleaseMethod · 0.80
ReleaseMethod · 0.80
ReleaseMethod · 0.80
ReleaseMethod · 0.80

Calls 3

deleteStruct · 0.85
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected