krata/xen/xenevtchn/examples/simple.rs
2024-01-22 22:33:50 -08:00

11 lines
292 B
Rust

use xenevtchn::{EventChannel, EventChannelError};
fn main() -> Result<(), EventChannelError> {
let mut channel = EventChannel::open()?;
println!("Channel opened.");
let port = channel.bind_unbound_port(1)?;
println!("port: {}", port);
channel.unbind(port)?;
Ok(())
}