Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chyyuu/os_kernel_lab
/ lock
Function
lock
user/src/bin/adder_simple_spin.rs:27–30 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
25
}
26
27
unsafe fn lock() {
28
while vload!(&OCCUPIED) {}
29
OCCUPIED = true;
30
}
31
32
unsafe fn unlock() {
33
OCCUPIED = false;
Callers
1
f
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected