Skip to content
Snippets Groups Projects
Commit 01ea7596 authored by Samuel Karlsson's avatar Samuel Karlsson
Browse files

bare4: tack 3

parent ebf156f6
Branches
No related tags found
No related merge requests found
File deleted
...@@ -103,14 +103,22 @@ fn main() { ...@@ -103,14 +103,22 @@ fn main() {
// //
// why is important that ordering of volatile operations are ensured by the compiler? // why is important that ordering of volatile operations are ensured by the compiler?
// ** your answer here ** // ** your answer here **
// The order of the operations can efekt the out come of the program, race condition.
// //
// give an example in the above code, where reordering might make things go horribly wrong // give an example in the above code, where reordering might make things go horribly wrong
// (hint, accessing a peripheral not being powered...) // (hint, accessing a peripheral not being powered...)
// ** your answer here ** // ** your answer here **
// in som cases wen seting an walue or aktivating a perifial is nessesary to do befor a read or
// simelar.
// seting gpioA ass activ befor reading. the compiler do not know if a perifial writ is to set a
// setin or blink a led.
// //
// without the non-reording proprety of `write_volatile/read_volatile` could that happen in theory // without the non-reording proprety of `write_volatile/read_volatile` could that happen in theory
// (argue from the point of data dependencies) // (argue from the point of data dependencies)
// ** your answer here ** // ** your answer here **
// If the compiler is left to it self wil it in som case changes the order of the read/write
// operation. if somthig can gow wrong it will. sow it is lickly that the program is broken if the
// is no forsd ordering
// //
// commit your answers (bare4_3) // commit your answers (bare4_3)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment