This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Barrier / atomic operations on multiprocessors.
- From: Ray Whitmer <ray at personallegal dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 27 May 2006 09:46:46 -0600
- Subject: Barrier / atomic operations on multiprocessors.
- Openpgp: id=BEBAA338; url=http://ray.jhax.net
Is there a generic way to access efficient platform-appropriate memory
barriers (also compare and swap) in any arbitrary C or C++ program
compiled under gcc (not just a compiler ordering directive, but
extending to hardware guarantees)?
If it is documented somewhere, I apologize.
It would be critical to many sorts of new projects attempting lock-free
operations for multi-processor machines.
Every significant project I know winds up redefining their own, and it
would seem to me that the GCC compiler is a very appropriate place to
have these generically defined.
I am just trying to make a lock-free hashtable. I do not see a C++
standard emerging for years.
Thanks,
Ray Whitmer