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

Callers 1

fFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected