mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-04 07:39:39 +00:00 
			
		
		
		
	move xen libraries to xen/
This commit is contained in:
		
							
								
								
									
										10
									
								
								xen/xenevtchn/examples/simple.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								xen/xenevtchn/examples/simple.rs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
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(())
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user