title: Best way to implement read and write mutexes using pthreads?
body: <p>I've got a data structure that could be read simultaneously by 100s of threads, but naturally write/write and write/read conflicts must be avoided. My 1st attempt with pthread_mutex_lock prevented multiple reads. What would be a good way, using pthreads, to prevent write/write and write/read while allowing multiple reads?</p>