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() };
let mut scheme = File::create(":pci").expect("pcid: failed to create pci scheme");
loop {
let mut packet = Packet::default(); 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");
......@@ -5,7 +5,7 @@ use std::thread;
use keymap;
pub fn keyboard() {
pub fn keyboard() {
let mut file = File::open("irq:1").expect("ps2d: failed to open irq:1");
loop {
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