Add #[doc(hidden)] to {vga_buffer, serial}::_print functions

This commit is contained in:
Philipp Oppermann
2018-11-19 10:14:47 +01:00
parent dbfb732325
commit ad7c11c0a3
5 changed files with 13 additions and 2 deletions

View File

@@ -247,6 +247,7 @@ We can already provoke a deadlock in our kernel. Remember, our `println` macro c
[]
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use core::fmt::Write;
WRITER.lock().write_fmt(args).unwrap();
@@ -302,6 +303,7 @@ To avoid this deadlock, we can disable interrupts as long as the `Mutex` is lock
/// Prints the given formatted string to the VGA text buffer
/// through the global `WRITER` instance.
#[doc(hidden)]
pub fn _print(args: fmt::Arguments) {
use core::fmt::Write;
use x86_64::instructions::interrupts; // new
@@ -322,6 +324,7 @@ We can apply the same change to our serial printing function to ensure that no d
```rust
// in src/serial.rs
#[doc(hidden)]
pub fn _print(args: ::core::fmt::Arguments) {
use core::fmt::Write;
use x86_64::instructions::interrupts; // new