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_yield.rs:27–32 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
25
}
26
27
unsafe fn lock() {
28
while OCCUPIED {
29
yield_();
30
}
31
OCCUPIED = true;
32
}
33
34
unsafe fn unlock() {
35
OCCUPIED = false;
Callers
1
f
Function · 0.70
Calls
1
yield_
Function · 0.85
Tested by
no test coverage detected