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

Interface Functions

pkg/segment/set.go:69–97  ·  view source on GitHub ↗

Functions is a required type parameter that must be a struct implementing the methods defined by Functions.

Source from the content-addressed store, hash-verified

67// Functions is a required type parameter that must be a struct implementing
68// the methods defined by Functions.
69type Functions interface {
70 // MinKey returns the minimum allowed key.
71 MinKey() Key
72
73 // MaxKey returns the maximum allowed key + 1.
74 MaxKey() Key
75
76 // ClearValue deinitializes the given value. (For example, if Value is a
77 // pointer or interface type, ClearValue should set it to nil.)
78 ClearValue(*Value)
79
80 // Merge attempts to merge the values corresponding to two consecutive
81 // segments. If successful, Merge returns (merged value, true). Otherwise,
82 // it returns (unspecified, false).
83 //
84 // Preconditions: r1.End == r2.Start.
85 //
86 // Postconditions: If merging succeeds, val1 and val2 are invalidated.
87 Merge(r1 Range, val1 Value, r2 Range, val2 Value) (Value, bool)
88
89 // Split splits a segment's value at a key within its range, such that the
90 // first returned value corresponds to the range [r.Start, split) and the
91 // second returned value corresponds to the range [split, r.End).
92 //
93 // Preconditions: r.Start < split < r.End.
94 //
95 // Postconditions: The original value val is invalidated.
96 Split(r Range, val Value, split Key) (Value, Value)
97}
98
99const (
100 // minDegree is the minimum degree of an internal node in a Set B-tree.

Callers 23

StartMethod · 0.65
MinKeyMethod · 0.65
EndMethod · 0.65
MaxKeyMethod · 0.65
RemoveMethod · 0.65
rebalanceAfterRemoveMethod · 0.65
zeroValueSliceFunction · 0.65
mergeProfilesFunction · 0.65
SeccompInfoMethod · 0.65
SyscallFiltersMethod · 0.65
writeFrameMethod · 0.65
getPMAsInternalLockedMethod · 0.65

Implementers 15

devAddrSetFuncspkg/sentry/devices/tpuproxy/accel/acce
devAddrSetFuncspkg/sentry/devices/tpuproxy/vfio/tpu_f
lockSetFunctionspkg/sentry/fsimpl/lock/lock_set_functi
aplUnloadedSetFunctionspkg/sentry/pgalloc/save_restore.go
unwasteSetFunctionspkg/sentry/pgalloc/pgalloc.go
unfreeSetFunctionspkg/sentry/pgalloc/pgalloc.go
memAcctSetFunctionspkg/sentry/pgalloc/pgalloc.go
evictableRangeSetFunctionspkg/sentry/pgalloc/pgalloc.go
syntheticTimerSetFunctionspkg/sentry/ktime/synthetic_timer.go
pmaSetFunctionspkg/sentry/mm/pma.go
vmaSetFunctionspkg/sentry/mm/vma.go
mappingSetFunctionspkg/sentry/memmap/mapping_set.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…