Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacWoods committed Sep 17, 2023
1 parent 066aa99 commit 42d5870
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aml/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ pub trait Handler: Send + Sync {
/// 100 microseconds.
fn stall(&self, microseconds: u64);

/// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep time
/// supported, and should relinquish the processor.
/// Sleep for at least the given number of **milliseconds**. An implementation may round to the closest sleep
/// time supported, and should relinquish the processor.
fn sleep(&self, milliseconds: u64);

fn handle_fatal_error(&self, fatal_type: u8, fatal_code: u32, fatal_arg: u64) {
Expand Down
6 changes: 6 additions & 0 deletions aml/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ impl Handler for TestHandler {
fn write_pci_u32(&self, _segment: u16, _bus: u8, device: u8, _function: u8, _offset: u16, _value: u32) {
unimplemented!()
}
fn stall(&self, _microseconds: u64) {
unimplemented!()
}
fn sleep(&self, _milliseconds: u64) {
unimplemented!()
}
}

pub(crate) fn make_test_context() -> AmlContext {
Expand Down
7 changes: 7 additions & 0 deletions aml_tester/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,11 @@ impl aml::Handler for Handler {
fn write_pci_u32(&self, segment: u16, bus: u8, device: u8, function: u8, _offset: u16, value: u32) {
println!("write_pci_u32 ({segment:#x}, {bus:#x}, {device:#x}, {function:#x})<-{value:#x}");
}

fn stall(&self, microseconds: u64) {
println!("Stalling for {}us", microseconds);
}
fn sleep(&self, milliseconds: u64) {
println!("Sleeping for {}ms", milliseconds);
}
}

0 comments on commit 42d5870

Please sign in to comment.