mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 23:07:50 +00:00
Move images next to their corresponding posts
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
@@ -259,7 +259,7 @@ It just creates a new Writer that points to the VGA buffer at `0xb8000`. Then it
|
||||
|
||||
[byte character]: https://doc.rust-lang.org/reference.html#characters-and-strings
|
||||
|
||||

|
||||

|
||||
|
||||
### Volatile
|
||||
We just saw that our `H` was printed correctly. However, it might not work with future Rust compilers that optimize more aggressively.
|
||||
@@ -583,7 +583,7 @@ Since we imported the macros at crate level, they are available in all modules a
|
||||
|
||||
As expected, we now see a _“Hello World!”_ on a cleared screen:
|
||||
|
||||

|
||||

|
||||
|
||||
### Deadlocks
|
||||
Whenever we use locks, we must be careful to not accidentally introduce _deadlocks_. A [deadlock] occurs when a thread/program waits for a lock that will never be released. Normally, this happens when multiple threads access multiple locks. For example, when thread A holds lock 1 and tries to acquire lock 2 and -- at the same time -- thread B holds lock 2 and tries to acquire lock 1.
|
||||
@@ -633,7 +633,7 @@ Now the macro only evaluates the arguments (through `format_args!`) and passes t
|
||||
|
||||
Thus, we fixed the deadlock:
|
||||
|
||||

|
||||

|
||||
|
||||
We see that both “inner” and “outer” are printed.
|
||||
|
||||
|
||||
BIN
blog/content/posts/04-printing-to-screen/vga-H-lower-left.png
Normal file
BIN
blog/content/posts/04-printing-to-screen/vga-H-lower-left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
blog/content/posts/04-printing-to-screen/vga-hello-world.png
Normal file
BIN
blog/content/posts/04-printing-to-screen/vga-hello-world.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
Reference in New Issue
Block a user