Subj : Re: compare and swap operation To : comp.programming.threads From : Joe Seigh Date : Tue Oct 11 2005 04:59 pm Yang Zhang wrote: > I am reading some lock-free shared data-structures currently and am > planning to implement some of them. They are mostly built on the atomic > CAS (compare and swap) operation. I am just wondering how can I use the > hardware CAS instruction? I googled for some time, but it seems there is > very little information on this. I am mainly using C++, pthread library > and the GNU g++ compiler and how can I use the hardware CAS instruction > on Intel/Linux, Sparc/Solaris, and MIPS/IRIX systems. Can someone > provide some examples or point me to the right place? Thanks in advance. > Check out the atomic_ops package here http://www.hpl.hp.com/research/linux/qprof/ -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .