Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created June 14, 2018 17:32
Show Gist options
  • Save olbrichj/66791503d154cf498b0fda6f0f325e69 to your computer and use it in GitHub Desktop.
Save olbrichj/66791503d154cf498b0fda6f0f325e69 to your computer and use it in GitHub Desktop.
//Processor #1:
while f == 0 {
OSMemoryBarrier()
print x
}
//Processor #2:
x = 42
OSMemoryBarrier()
f = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment