Question: Wikipedia provides an implementation of Peterson's algorithm to provide mutual exclusion using loads and stores at https://en.wikipedia.org/ wiki/Peterson's_algorithm. Unfortunately, this code is not guaranteed to work with modern compilers or hardware. Update the code to include memory barriers where necessary. (Of course you could add a memory barrier before and after each instruction; your solution should instead add memory barriers only where necessary for correctness.)