Atomic access library

Libatomic provides arch-independant API for the low-level atomic implementation. Library supports x86 (both i386 and x86_64), PPC64, Sparc64 (v9 and higher) and with modern gcc (version higher than 4.1.0) and its <code>__sync</code> extensions all its supported platforms.

Library exports platform-dependant <code>atomic_t</code> type and number of API to work with, namely&#10;void atomic_set(atomic_t *a, int val)&#10;int atomic_add(atomic_t *a, int val);&#10;int atomic_sub(atomic_t *a, int val);&#10;int atomic_inc(atomic_t *a);&#10;int atomic_dec(atomic_t *a);&#10;int atomic_dec_and_test(atomic_t *a);

All functions perform atomic operation and return new value of the atomic counter. <code>atomic_dec_and_test()</code> returns true if after decrement counter reached zero.

Library configuration automatically performs architecture detection and selection for the proper low-level atomic implementation. It is easily extensible with new platform-dependant code (both inline and usual asm or C if needed).

Source code is available in <a href="/cgi-bin/gitweb.cgi?p=libatomic.git;a=summary">git</a> tree or <a href="/archive/libatomic">archive</a>.