title: What part of memory does a mutex lock? (pthreads)
body: <p>All the documentation I've read on the pthreads mutex states only that a mutex prevents multiple threads from accessing shared memory, but how do you specify in the program what exactly is that? Is it all the global variables in the program, the variables being accessed between the locking and unlocking functions, or... ? Everything I've found on pthreads, including the examples, is irritatingly vague.</p>