MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / guard

Function guard

crates/openshell-vfio/src/bind.rs:326–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324 static VFIO_ID_REFCOUNT_TEST_LOCK: Mutex<()> = Mutex::new(());
325
326 pub fn guard() -> MutexGuard<'static, ()> {
327 VFIO_ID_REFCOUNT_TEST_LOCK
328 .lock()
329 .unwrap_or_else(PoisonError::into_inner)
330 }
331
332 /// Remove a specific vendor:device key from the global refcount map.
333 /// Used by tests to clean up their own entries without disturbing

Calls

no outgoing calls