[perf-discuss] Re: Is the following CAS(Compare and Swap ) function preserves atomicity?
In our solaris system atomic_cas( ) is not available in user space,to make it available we require to download some of the patches. So we are making use of our own atomic primitive. Base on your guidance we are trying to modify our primitive to make use of CMPXCHG instruction. As atomic
[perf-discuss] Is the following CAS(Compare and Swap ) function preserves atomicity?
Hi, Below is the atomic function of compare and swap instruction (CAS) written in assembly code. The following is general description of the function for CAS(int *p,int n,int k) which does if(*p == n) { *p = k;