Commit a737a712 authored by Jeremy Soller's avatar Jeremy Soller

Implement user schemes. Example in pcid. Currently deadlocks in UserInner

parent 1bbd71d7
......@@ -2,8 +2,10 @@
extern crate syscall;
use std::fs::File;
use std::io::{Read, Write};
use std::thread;
use syscall::iopl;
use syscall::{iopl, Packet};
use pci::{Pci, PciBar, PciClass};
......@@ -75,5 +77,17 @@ fn main() {
unsafe { iopl(3).unwrap() };
enumerate_pci();
let mut scheme = File::create(":pci").expect("pcid: failed to create pci scheme");
loop {
let mut packet = Packet::default();
scheme.read(&mut packet).expect("pcid: failed to read events from pci scheme");
println!("{:?}", packet);
packet.a = 0;
scheme.write(&packet).expect("pcid: failed to write responses to pci scheme");
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment