title: How does a thread acquire a mutex lock?
body: <p>My question here is about a thread acquiring a mutex lock.</p>
  
  <p>We use <code>pthread_mutex_t</code> locks to ensure sequential access to variables, when being read/written in a multi-threaded program. But <code>pthread_mutex_t lock ;</code> is also a global variable shared between threads. Will accessing of <em>this</em> global variable (the lock) be the same as accessing other global variables? If it is the same, then won't we face the <em>same</em> problem that we will face for other global variables? And if not, then how accessing a lock data structure different from accessing other global variables?</p>
  
  <p>In short: Why don't we need to lock access to locks themselves and so end up in a chicken-and-egg problem?</p>