mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
rate_limiter: add a safety comment
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
b1efa5b26b
commit
58b7057c7f
@ -343,6 +343,7 @@ impl RateLimiter {
|
||||
let timer_fd = TimerFd::new()?;
|
||||
// Note: vmm_sys_util::TimerFd::new() open the fd w/o O_NONBLOCK. We manually add this flag
|
||||
// so that `Self::event_handler` won't be blocked with `vmm_sys_util::TimerFd::wait()`.
|
||||
// SAFETY: FFI calls.
|
||||
let ret = unsafe {
|
||||
let fd = timer_fd.as_raw_fd();
|
||||
let mut flags = libc::fcntl(fd, libc::F_GETFL);
|
||||
|
Loading…
Reference in New Issue
Block a user