MCPcopy
hub / github.com/google/gvisor / SetFD

Method SetFD

pkg/sentry/fsutil/mmap_file.go:46–46  ·  view source on GitHub ↗

File.IncRef may be called on pages without an existing reference as long as MappableRelease has not been called. SetFD sets the file descriptor represented by the MmapFile. It must be called on zero-value (implementations of) MmapFile before first use. If fd >= 0, the MmapFile takes ownership of the

(fd int)

Source from the content-addressed store, hash-verified

44 //
45 // Preconditions: MappableRelease has never been called.
46 SetFD(fd int)
47
48 // MappableRelease is called by the memmap.Mappable that is the nominal
49 // owner of the represented file descriptor, to indicate that the Mappable

Callers 13

OpenMethod · 0.65
OpenMethod · 0.65
OpenMethod · 0.65
getPciDeviceFdMethod · 0.65
OpenMethod · 0.65
OpenMethod · 0.65
afterLoadMethod · 0.65
newInodeFunction · 0.65
newSpecialFileFDFunction · 0.65
completeRestoreMethod · 0.65
initMethod · 0.65

Implementers 2

MmapCachedFilepkg/sentry/fsutil/mmap_cached_file.go
MmapPreciseFilepkg/sentry/fsutil/mmap_precise_file.go

Calls

no outgoing calls

Tested by

no test coverage detected