2 ms·
mutexes and spinlocks use atomic operations to function. If you can use an atomic operation to replace either of them, your program will be quicker. It will be
by ryao 12y ago
mutexes and spinlocks use atomic operations to function. If you can use an atomic operation to replace either of them, your program will be quicker. It will be even quicker if you can use per-cpu or per-thread variables to reduce synchronization overhead.