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

Method new

bootloader/kernel/src/virtio.rs:42–48  ·  view source on GitHub ↗
(queue_size: u16)

Source from the content-addressed store, hash-verified

40}
41impl QueueFreeDescs {
42 pub fn new(queue_size: u16) -> Self {
43 let mut free = Vec::with_capacity(queue_size as usize);
44 for i in 0..queue_size {
45 free.push(i as u16);
46 }
47 Self { free }
48 }
49 pub fn get_free(&mut self) -> Option<u16> {
50 self.free.pop()
51 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected