MCPcopy 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
27unsafe fn lock() {
28 while OCCUPIED {
29 yield_();
30 }
31 OCCUPIED = true;
32}
33
34unsafe fn unlock() {
35 OCCUPIED = false;

Callers 1

fFunction · 0.70

Calls 1

yield_Function · 0.85

Tested by

no test coverage detected