MCPcopy Create free account
hub / github.com/AveryOS/avery / lock

Method lock

kernel/spin/mutex.rs:147–155  ·  view source on GitHub ↗

Locks the spinlock and returns a guard. The returned value may be dereferenced for data access and the lock will be dropped when the guard falls out of scope. ``` let mylock = spin::Mutex::new(0); { let mut data = mylock.lock(); // The lock is now locked and the data can be accessed data += 1; // The lock is implicitly dropped } ```

(&self)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

println_argsFunction · 0.80
print_argsFunction · 0.80
initializeFunction · 0.80
map_viewFunction · 0.80
unmap_viewFunction · 0.80
mapFunction · 0.80
unmapFunction · 0.80
new_processFunction · 0.80
get_physical_pageFunction · 0.80
initialize_initialFunction · 0.80
map_local_page_tablesFunction · 0.80
can_allocFunction · 0.80

Calls 2

obtain_lockMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected