Atomic operation: Difference between revisions

m
Typo
[unchecked revision][unchecked revision]
(Added information about GCC's atomic operations.)
m (Typo)
 
(One intermediate revision by one other user not shown)
Line 1:
An '''atomic operation''' is an operation that will always be executed without any other process being able to read or change state that is read or changed during the operation. It is effectively executed as a single step, and is an important quality in a number of algorithms that deal with multiple indepentindependent processes, both in synchronization and algorithms that update shared data without requiring synchronization.
 
== Methods for ensuring an operation is atomic ==
Line 15:
== Implementation ==
 
A few of the [[Synchronization Primitives]] (sub)pages have implementations or examples of atomic operations. Besides that, GCC can make your life easier because it has built-in functions for them. You can take a look at the [http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Atomic-Builtins.html GCC Documentation] (the link is GCC 4.4.1 specific, but it shouldn't be hard to find the docs matching the version number of your GCC).
 
[[Category:Synchronization]]
Anonymous user