MCPcopy Create free account
hub / github.com/Ruddle/Fomos / wait_block

Function wait_block

bootloader/kernel/src/interrupts.rs:99–115  ·  view source on GitHub ↗
(ms: u64)

Source from the content-addressed store, hash-verified

97}
98
99pub fn wait_block(ms: u64) {
100 let current = TIME_MS.load(Ordering::Relaxed);
101 loop {
102 if TIME_MS.load(Ordering::Relaxed) > current + ms {
103 break;
104 } else {
105 x86_64::instructions::nop();
106 x86_64::instructions::nop();
107 x86_64::instructions::nop();
108 x86_64::instructions::nop();
109 x86_64::instructions::nop();
110 x86_64::instructions::nop();
111 x86_64::instructions::nop();
112 x86_64::instructions::nop();
113 }
114 }
115}
116pub async fn a_sleep(ms: u64) {
117 let timer = Timer::new(ms);
118 timer.await;

Callers

nothing calls this directly

Calls 1

nopFunction · 0.50

Tested by

no test coverage detected