Module poll_thread

Source
Expand description

This file contains all functions and structs used to handle polling operations for the fido backend device.

Structsยง

PollTimer
PollTimer is a wrapper around the crosvm-provided Timer struct with a focus on maintaining a regular interval with easy arm() and clear() methods to start and stop the timer transparently from the interval.

Enumsยง

Token ๐Ÿ”’

Functionsยง

handle_packet_poll ๐Ÿ”’
Handles polling for available data to send back to the guest.
packet_timer_needs_rearm ๐Ÿ”’
Checks whether we should re-arm the packet poll timer or not.
poll_for_pending_packets
This function is the main poll thread. It periodically wakes up to emulate a USB interrupt (poll) device behavior. It takes care of three different poll timers:
process_pending_transfer ๐Ÿ”’
Filter functions used to check for expired or canceled transfers. It is called over each USB transfer waiting in the pending queue. Returns true if the given transfer is still valid, otherwise false.
signal_device_lost ๐Ÿ”’
Signals to the current transfer that the underlying device has been lost and the xhci layer should recover by detaching the FIDO backend.