MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vcpu_lock_all

Function vcpu_lock_all

freebsd/amd64/vmm/vmm_dev.c:139–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139static int
140vcpu_lock_all(struct vmmdev_softc *sc)
141{
142 int error, vcpu;
143 uint16_t maxcpus;
144
145 maxcpus = vm_get_maxcpus(sc->vm);
146 for (vcpu = 0; vcpu < maxcpus; vcpu++) {
147 error = vcpu_lock_one(sc, vcpu);
148 if (error)
149 break;
150 }
151
152 if (error) {
153 while (--vcpu >= 0)
154 vcpu_unlock_one(sc, vcpu);
155 }
156
157 return (error);
158}
159
160static void
161vcpu_unlock_all(struct vmmdev_softc *sc)

Callers 2

vmmdev_ioctlFunction · 0.85
vmmdev_destroyFunction · 0.85

Calls 3

vm_get_maxcpusFunction · 0.85
vcpu_lock_oneFunction · 0.85
vcpu_unlock_oneFunction · 0.85

Tested by

no test coverage detected