Files
krata/libs/xen/xenevtchn/examples/simple.rs

12 lines
282 B
Rust
Raw Normal View History

2024-01-30 02:05:37 -08:00
use xenevtchn::error::Result;
use xenevtchn::EventChannel;
2024-01-08 17:07:00 -08:00
2024-01-30 02:05:37 -08:00
fn main() -> Result<()> {
2024-01-08 17:07:00 -08:00
let mut channel = EventChannel::open()?;
println!("Channel opened.");
let port = channel.bind_unbound_port(1)?;
println!("port: {}", port);
channel.unbind(port)?;
Ok(())
}