P10 lab code added
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
For Mac users
|
||||
|
||||
"pthread_mutex_lock(&lock)" is slow on MACs compared to Linux:
|
||||
|
||||
use instead: "while (pthread_mutex_trylock(&lock) > 0) {} ;"
|
||||
|
||||
which implements a spin lock
|
||||
Reference in New Issue
Block a user