chore: remove pub visibility from exit event fields

The `exit_consumer` and `exit_notifier` fields are only used internally
by the exit_event() method implementation or by send_exit_event() in the
sound device. So, they do not need to be exposed in the public API of
backend structures.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
Stefano Garzarella 2025-11-19 10:38:45 +01:00 committed by Manos Pitsidianakis
parent 9040bcb726
commit 9191a0c1de
13 changed files with 26 additions and 26 deletions

View File

@ -127,8 +127,8 @@ unsafe impl ByteValued for VirtioVideoConfig {}
pub(crate) struct VuVideoBackend {
config: VirtioVideoConfig,
pub threads: Vec<Mutex<VhostUserVideoThread>>,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
}
impl VuVideoBackend {

View File

@ -141,8 +141,8 @@ pub struct VhostUserConsoleBackend {
pub stream: Option<Box<dyn ReadWrite + Send + Sync>>,
pub rx_event: EventFd,
pub rx_ctrl_event: EventFd,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
}

View File

@ -160,8 +160,8 @@ pub(crate) struct VhostUserGpioBackend<D: GpioDevice> {
controller: Arc<GpioController<D>>,
handles: Arc<RwLock<Vec<Option<JoinHandle<()>>>>>,
event_idx: bool,
pub(crate) exit_consumer: EventConsumer,
pub(crate) exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
}

View File

@ -141,8 +141,8 @@ struct VhostUserGpuBackendInner {
virtio_cfg: VirtioGpuConfig,
event_idx_enabled: bool,
gpu_backend: Option<GpuBackend>,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
gpu_config: GpuConfig,
}

View File

@ -105,8 +105,8 @@ unsafe impl ByteValued for VirtioI2cInHdr {}
pub(crate) struct VhostUserI2cBackend<D: I2cDevice> {
i2c_map: Arc<I2cMap<D>>,
event_idx: bool,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryLoadGuard<GuestMemoryMmap>>,
}

View File

@ -124,8 +124,8 @@ impl From<VuInputError> for io::Error {
pub(crate) struct VuInputBackend<T: InputDevice> {
event_idx: bool,
ev_dev: T,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
select: u8,
subsel: u8,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,

View File

@ -90,8 +90,8 @@ pub(crate) struct VuRngBackend<T: ReadVolatile> {
event_idx: bool,
timer: VuRngTimerConfig,
rng_source: Arc<Mutex<T>>,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
}

View File

@ -96,8 +96,8 @@ type ScmiDescriptorChain = DescriptorChain<GuestMemoryLoadGuard<GuestMemoryMmap<
pub struct VuScmiBackend {
event_idx: bool,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
/// Event vring and descriptors serve for asynchronous responses and
/// notifications. They are obtained from the driver and we store them

View File

@ -39,8 +39,8 @@ pub struct VhostUserScsiBackend {
event_idx: bool,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
targets: Vec<Box<dyn Target>>,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
}
impl Default for VhostUserScsiBackend {

View File

@ -486,8 +486,8 @@ impl VhostUserSoundThread {
pub struct VhostUserSoundBackend {
pub threads: Vec<RwLock<VhostUserSoundThread>>,
virtio_cfg: VirtioSoundConfig,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
audio_backend: RwLock<Box<dyn AudioBackend + Send + Sync>>,
}

View File

@ -137,8 +137,8 @@ unsafe impl ByteValued for VirtioSpiConfig {}
pub(crate) struct VhostUserSpiBackend<D: SpiDevice> {
spi_ctrl: Arc<SpiController<D>>,
event_idx: bool,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
}

View File

@ -53,8 +53,8 @@ impl From<Error> for std::io::Error {
pub struct VhostUserFooBackend {
info: FooInfo,
event_idx: bool,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
mem: Option<GuestMemoryLoadGuard<GuestMemoryMmap>>,
}

View File

@ -259,8 +259,8 @@ pub(crate) struct VhostUserVsockBackend {
queue_size: usize,
pub threads: Vec<Mutex<VhostUserVsockThread>>,
queues_per_thread: Vec<u64>,
pub exit_consumer: EventConsumer,
pub exit_notifier: EventNotifier,
exit_consumer: EventConsumer,
exit_notifier: EventNotifier,
}
impl VhostUserVsockBackend {