Dekker's algorithm in today's world
There are four files here.
- dekker.c
The C source code.
- dekker-O0.s
The result of gcc -UV -O0 -S dekker.c, renamed.
- dekker-O3.s
The result of gcc -UV -O3 -S dekker.c, renamed.
Look for "L4: jmp L4", an infinite loop.
- dekker-V3.s
The result of gcc -DV -O3 -S dekker.c, renamed.
Notice that the infinite loop isn't there any more.
In order to make sense of these, you need to know
something about x86 assembly language.
There is a
CMU handout that should help.