Changes

Jump to: navigation, search

Atomic Operation

3 bytes removed, 22:23, 9 October 2019
no edit summary
GCC provides [[Compiler Intrinsics|intrinsics]] for some atomic operations.
(Note that in the above example, even the <code>lock++</code> instructions statement may not be atomic - it will typically compile into the three-operation sequence "load-increment-store", and its possible that two processes or threads could each perform this operation in an interleaved fashion and increment <code>lock</code> by just one instead of two).

Navigation menu