MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / start_http_fd_thread

Function start_http_fd_thread

vmm/src/api/http/mod.rs:433–453  ·  view source on GitHub ↗
(
    fd: RawFd,
    api_notifier: EventFd,
    api_sender: Sender<ApiRequest>,
    seccomp_action: &SeccompAction,
    exit_evt: EventFd,
    hypervisor_type: HypervisorType,
    landlock_enable: boo

Source from the content-addressed store, hash-verified

431}
432
433pub fn start_http_fd_thread(
434 fd: RawFd,
435 api_notifier: EventFd,
436 api_sender: Sender<ApiRequest>,
437 seccomp_action: &SeccompAction,
438 exit_evt: EventFd,
439 hypervisor_type: HypervisorType,
440 landlock_enable: bool,
441) -> Result<HttpApiHandle> {
442 // SAFETY: Valid FD
443 let server = unsafe { HttpServer::new_from_fd(fd) }.map_err(VmmError::CreateApiServer)?;
444 start_http_thread(
445 server,
446 api_notifier,
447 api_sender,
448 seccomp_action,
449 exit_evt,
450 hypervisor_type,
451 landlock_enable,
452 )
453}
454
455pub fn http_api_graceful_shutdown(http_handle: HttpApiHandle) -> Result<()> {
456 let (api_thread, api_shutdown_fd) = http_handle;

Callers 1

start_vmm_threadFunction · 0.85

Calls 1

start_http_threadFunction · 0.85

Tested by

no test coverage detected