发布时间:2013-03-16 19:36:21
pthread_spin_lock的实现中体现了避免多核cache同步的思想,多核cache同步比较浪费时间,所以要尽量避免。intpthread_spin_lock (pthread_spinlock_t *lock){ /* atomic_exchange usually takes less instructions than atomic_compare_and_exchange. On the other hand,&nbs.........【阅读全文】