Fix a bug in HostEventFd

This commit is contained in:
Tate, Hongliang Tian 2020-09-30 06:03:06 +00:00 committed by Tate, Hongliang Tian
parent 567e965eae
commit f39a31cda0

@ -65,6 +65,10 @@ impl HostEventFd {
/// ///
/// Precondition. The caller must ensure that the host fds are valid. /// Precondition. The caller must ensure that the host fds are valid.
pub unsafe fn write_u64_raw_and_batch(host_fds: &[FileDesc], val: u64) { pub unsafe fn write_u64_raw_and_batch(host_fds: &[FileDesc], val: u64) {
if host_fds.len() == 0 {
return;
}
ocall_eventfd_write_batch(host_fds, val); ocall_eventfd_write_batch(host_fds, val);
} }