title: Is there a term for a "single mutex deadlock" (deadlock-type situation with non-recursive mutex)?
body: <p>The following code hangs because of multiple calls to acquire a non-recursive mutex:</p>
  
  <pre><code>#include &lt;pthread.h&gt;
  
  class Lock
  {
  public:
  
    Lock( pthread_mutex_t&amp; mutex )
      : mutex_( mutex )
    {
      pthread_mutex_lock( &amp;mutex_ );
    }
  
    ~Lock()
    {
      pthread_mutex_unlock( &amp;mutex_ );
    }
  
  private:
  
    pthread_mutex_t&amp; mutex_;
  };
  
  class Foo
  {
  public:
  
    Foo()
    {
      pthread_mutex_init( &amp;mutex_, NULL );
    }
  
    ~Foo()
    {
      pthread_mutex_destroy( &amp;mutex_ );
    }
  
    void hang()
    {
      Lock l( mutex_ );
      subFunc();
    }
  
    void subFunc()
    {
      Lock l( mutex_ );
    }
  
  private:
  
    pthread_mutex_t mutex_;
  };
  
  int main()
  {
    Foo f;
    f.hang();
  }
  </code></pre>
  
  <p>Is there a word or phrase for this situation? I'm not sure, but I don't think this can properly be called a deadlock: I'm of the understanding that a deadlock proper refers to the stalemate resulting from impassably ordered acquisition of <em>multiple</em> shared resources.</p>
  
  <p>I've been anecdotally calling this a "single mutex deadlock" but I'd like to learn if there is a more proper term/phrase for this.</p>