Skip to content
Permalink
Browse files

cfg(not(test)) all the things

  • Loading branch information...
phil-opp committed Oct 26, 2018
1 parent 316cc85 commit 2df66fe9cf254ade94dceb039ac34d23a8f7cbde
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/lib.rs
@@ -17,18 +17,22 @@ extern crate std;

#[macro_use]
pub mod vga_buffer;
#[cfg(not(test))]
pub mod gdt;
#[cfg(not(test))]
pub mod interrupts;
#[cfg(not(test))]
pub mod serial;

#[cfg(not(test))]
pub unsafe fn exit_qemu() {
use x86_64::instructions::port::Port;

let mut port = Port::<u32>::new(0xf4);
port.write(0);
}

#[cfg(not(test))]
pub fn hlt_loop() -> ! {
loop {
x86_64::instructions::hlt();

0 comments on commit 2df66fe

Please sign in to comment.
You can’t perform that action at this time.