摘要: http://www.parallellabs.com/2010/01/31/pthreads-programming-spin-lock-vs-mutex-performance-analysis/POSIX threads(简称Pthreads)是在多核平台上进行并行编程的一套常用的API。线程同步(Thread Synchronization)是并行编程中非常重要的通讯手段,其中最典型的应... 阅读全文
posted @ 2010-10-25 23:25 史莱姆 阅读(663) 评论(0) 推荐(0) 编辑
摘要: On Mac OS X and Windows there are builtin CompareAndSwap functions you should be using anyway (InterlockedCompareExchange() and OSAtomicCompareAndSwapPtrBarrier() respectively). Thus will work rega... 阅读全文
posted @ 2010-10-25 23:09 史莱姆 阅读(268) 评论(0) 推荐(0) 编辑