diff --git a/core/src/lib.rs b/core/src/lib.rs index c4e06e5..9d57219 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,3 +1,11 @@ +//! This crate is a library both used by the partition and the hypervisor side +//! of the Linux based ARINC 653 hypervisor. +//! +//! The pivot for interaction between the hypervisor and the partitions is +//! formed by a Unix Domain Socket, which is exposed under a well-known path +//! ([syscall::SYSCALL_SOCKET_PATH]) by the hypervisor +//! prior to invocation of a partition. + #[macro_use] extern crate log; #[macro_use] diff --git a/core/src/syscall.rs b/core/src/syscall.rs index 8a84a69..af9ed16 100644 --- a/core/src/syscall.rs +++ b/core/src/syscall.rs @@ -4,7 +4,7 @@ use anyhow::{anyhow, Result}; use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use enum_primitive::FromPrimitive; -pub static SYSCALL_SOCKET_PATH: &str = "/syscall-a653"; +pub const SYSCALL_SOCKET_PATH: &str = "/syscall-a653"; enum_from_primitive! { #[derive(Debug, Copy, Clone, PartialEq)] diff --git a/hypervisor/src/hypervisor/partition.rs b/hypervisor/src/hypervisor/partition.rs index 99dfa44..53317c8 100644 --- a/hypervisor/src/hypervisor/partition.rs +++ b/hypervisor/src/hypervisor/partition.rs @@ -290,12 +290,6 @@ impl Run { bind(syscall_socket, &UnixAddr::new(SYSCALL_SOCKET_PATH).unwrap()).unwrap(); - // Now that the socket is up and running, we will create a satellite thread - // listening on it. - std::thread::spawn(move || { - syscall::handle(syscall_socket, None).unwrap(); - }); - let constants: RawFd = PartitionConstants { name: base.name.clone(), identifier: base.id, diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs index 8ec791d..463c522 100644 --- a/hypervisor/src/lib.rs +++ b/hypervisor/src/lib.rs @@ -1,3 +1,5 @@ +//! Hypervisor side of the Linux based ARINC 653 hypervisor + #[macro_use] extern crate log; diff --git a/partition/src/lib.rs b/partition/src/lib.rs index 4076f9b..cc1dfce 100644 --- a/partition/src/lib.rs +++ b/partition/src/lib.rs @@ -1,3 +1,10 @@ +//! Partition side of the ARINC 653 Linux hypervisor +//! +//! This crate is a library, implementing and providing the ARINC 653 API meant +//! to be used from within a partition running on the Linux hypervisor. + +#[deny(dead_code)] +#[deny(missing_docs)] #[macro_use] extern crate log;