MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / queue_input_bytes

Method queue_input_bytes

devices/src/legacy/serial.rs:172–178  ·  view source on GitHub ↗

Queues raw bytes for the guest to read and signals the interrupt if the line status would change.

(&mut self, c: &[u8])

Source from the content-addressed store, hash-verified

170 /// Queues raw bytes for the guest to read and signals the interrupt if the line status would
171 /// change.
172 pub fn queue_input_bytes(&mut self, c: &[u8]) -> Result<()> {
173 if !self.is_loop() {
174 self.in_buffer.extend(c);
175 self.recv_data()?;
176 }
177 Ok(())
178 }
179
180 pub fn flush_output(&mut self) -> result::Result<(), io::Error> {
181 if let Some(out) = self.out.as_mut() {

Callers 2

serial_inputFunction · 0.45
start_threadMethod · 0.45

Calls 3

is_loopMethod · 0.80
recv_dataMethod · 0.80
extendMethod · 0.45

Tested by 1

serial_inputFunction · 0.36