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

Method NewFDAt

pkg/sentry/kernel/task.go:829–831  ·  view source on GitHub ↗

NewFDAt is a convenience wrapper for t.FDTable().NewFDAt. This automatically passes the task as the context. Precondition: same as FDTable.

(fd int32, file *vfs.FileDescription, flags FDFlags)

Source from the content-addressed store, hash-verified

827//
828// Precondition: same as FDTable.
829func (t *Task) NewFDAt(fd int32, file *vfs.FileDescription, flags FDFlags) (*vfs.FileDescription, error) {
830 return t.fdTable.NewFDAt(t, fd, file, flags)
831}
832
833// WithMuLocked executes f with t.mu locked.
834func (t *Task) WithMuLocked(f func(*Task)) {

Callers 9

invokeCudaCheckpointFunction · 0.45
ImportFunction · 0.45
dup3Function · 0.45
TestFDTableManyFunction · 0.45
TestFDTableFunction · 0.45
TestDescriptorFlagsFunction · 0.45
BenchmarkNewFDAtFunction · 0.45
BenchmarkForkFunction · 0.45
BenchmarkCreateWithMaxFDFunction · 0.45

Calls

no outgoing calls

Tested by 6

TestFDTableManyFunction · 0.36
TestFDTableFunction · 0.36
TestDescriptorFlagsFunction · 0.36
BenchmarkNewFDAtFunction · 0.36
BenchmarkForkFunction · 0.36
BenchmarkCreateWithMaxFDFunction · 0.36