P10 lab code added

This commit is contained in:
Andreas Gieriet
2020-05-10 02:07:29 +02:00
parent c7d4ec972e
commit 382018f539
40 changed files with 1917 additions and 0 deletions
+7
View File
@@ -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