illinois-cs241 / coursebook

Open Source Introductory Systems Programming Textbook for the University of Illinois
http://cs241.cs.illinois.edu/coursebook
682 stars 85 forks source link

chapter 7 synchronization #178

Closed stardustman closed 4 years ago

stardustman commented 4 years ago

Describe the bug page 132 . The annotation before the pthread_mutex_lock(&m), I notice that the times of the for loop is 10,000,000. // However locking and unlocking a million times, change a to ten is better?