Fix remaining uses of {vga_buffer, serial}::print

This commit is contained in:
Philipp Oppermann
2018-11-19 09:45:27 +01:00
parent 8e292cc593
commit dbfb732325
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ pub fn _print(args: ::core::fmt::Arguments) {
#[macro_export]
macro_rules! serial_print {
($($arg:tt)*) => {
$crate::serial::print(format_args!($($arg)*));
$crate::serial::_print(format_args!($($arg)*));
};
}

View File

@@ -238,7 +238,7 @@ The hardware timer that we use is called the _Progammable Interval Timer_ or PIT
We now have a form of concurrency in our kernel: The timer interrupts occur asynchronously, so they can interrupt our `_start` function at any time. Fortunately Rust's ownership system prevents many types of concurrency related bugs at compile time. One notable exception are deadlocks. Deadlocks occur if a thread tries to aquire a lock that will never become free. Thus the thread hangs indefinitely.
We can already provoke a deadlock in our kernel. Remember, our `println` macro calls the `vga_buffer::print` function, which [locks a global `WRITER`][vga spinlock] using a spinlock:
We can already provoke a deadlock in our kernel. Remember, our `println` macro calls the `vga_buffer::_print` function, which [locks a global `WRITER`][vga spinlock] using a spinlock:
[vga spinlock]: ./second-edition/posts/03-vga-text-buffer/index.md#spinlocks