akern-gkgoat-fork/kernel/src/interp/objects.rs

20 lines
364 B
Rust
Raw Normal View History

use alloc::{vec, vec::Vec, collections::BTreeMap};
2023-04-12 18:08:07 +00:00
use spin::{Lazy, Mutex};
use crate::handle::Handle;
2023-04-12 19:11:11 +00:00
pub struct Object{
pub xml: xml::XMLElement
}
pub enum HandleTarget{
Object(Object)
2023-04-12 19:11:11 +00:00
}
pub type HostTargets = Vec<Option<HandleTarget>>;
2023-04-12 18:08:07 +00:00
pub const TARGETS: Lazy<Mutex<HostTargets>> = Lazy::new(|| {
2023-04-12 18:08:07 +00:00
let mut obj = vec![];
Mutex::new(obj)
});