Has anyone used the Sparc atomic swap instruction?
Has anyone used the Sparc atomic swap instruction to safely build lists in a multithreaded application? Any examples? Any references? Yes, but it would not help you if you use sun4c machines. ( No atomic instructions..) Thus you would be forced to use atomic in sun4m or later, and spl stuff in sun4c. Does not make a pretty picture. Why not use mutex_lock/unlock and let the libraries worry about that. mutex_lock uses atomic/spl stuff. Sinan [sun4c are SPARC v7 machines such as 4/110, SS1, SS1+, SS2, IPC, IPX, EPC, EPX. sun4m are v8 machines including SS10, SS20, SS4, SS5, 4/690, SS1000, SC2000. The UltraSPARC machines are SPARC v8+ (soon to be v9), but have the same instructions as the sun4ms.