vring: Add "get_call" method
Add a "get_call" method to obtain the current value for the call EventFd. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
parent
f4ee3226c0
commit
a577bbc868
1 changed files with 5 additions and 0 deletions
|
|
@ -251,6 +251,11 @@ impl<M: GuestAddressSpace> VringState<M> {
|
|||
self.call = file.map(|f| unsafe { EventFd::from_raw_fd(f.into_raw_fd()) });
|
||||
}
|
||||
|
||||
/// Get the `EventFd` for call.
|
||||
pub fn get_call(&self) -> &Option<EventFd> {
|
||||
&self.call
|
||||
}
|
||||
|
||||
/// Set `EventFd` for err.
|
||||
fn set_err(&mut self, file: Option<File>) {
|
||||
// SAFETY: see comment in set_kick()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue