Skip to content
Snippets Groups Projects
Commit 44aed7a6 authored by Ridge's avatar Ridge
Browse files

bare4_2

parent 3bc223d1
No related branches found
No related tags found
No related merge requests found
......@@ -101,12 +101,15 @@ fn main() -> ! {
//
// What was the error message and explain why.
//
// ** your answer here **
// Error message recieved "call to unsafe function". This is because the function being called
// is volatile, and has to be run in a unsafe function or block.
//
// Digging a bit deeper, why do you think `read_volatile` is declared `unsafe`.
// (https://doc.rust-lang.org/core/ptr/fn.read_volatile.html, for some food for thought )
//
// ** your answer here **
// read_volatile is a declared volatile operation, and thus are guarenteed to not be the same
// when read at different occassions. Declaring it as unsafe disables the rust memory guarentee, which
// allows the volatile function to read the memory.
//
// Commit your answers (bare4_2)
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment