MCPcopy Create free account
hub / github.com/containerd/cgroups / finalize

Method finalize

cgroup2/devicefilter.go:175–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173}
174
175func (p *program) finalize() (asm.Instructions, error) {
176 if p.hasWildCard {
177 // acceptBlock with asm.Return() is already inserted
178 return p.insts, nil
179 }
180 blockSym := fmt.Sprintf("block-%d", p.blockID)
181 p.insts = append(p.insts,
182 // R0 <- 0
183 asm.Mov.Imm32(asm.R0, 0).WithSymbol(blockSym),
184 asm.Return(),
185 )
186 p.blockID = -1
187 return p.insts, nil
188}
189
190func acceptBlock(accept bool) asm.Instructions {
191 v := int32(0)

Callers 1

DeviceFilterFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected