title: what is the "attribute" of a pthread mutex?
body: <p>The function pthread_mutex_init allows you to specify a pointer to an attribute. But I have yet to find a good explanation of what pthread attributes are. I have always just supplied NULL. Is there a use to this argument?</p>
  
  <p>The documentation, for those of you who forget it:</p>
  
  <blockquote>
    <p>PTHREAD_MUTEX_INIT(3)    BSD Library
    Functions Manual<br>
    PTHREAD_MUTEX_INIT(3)</p>
    
    <p>NAME
         pthread_mutex_init -- create a mutex</p>
    
    <p>SYNOPSIS</p>
  
  <pre><code> #include &lt;pthread.h&gt;
  
   int
   pthread_mutex_init(pthread_mutex_t *restrict mutex,
       const pthread_mutexattr_t *restrict attr);
  </code></pre>
    
    <p>DESCRIPTION
         The pthread_mutex_init() function creates a new mutex, with attributes
    specified
         with attr.  If attr is NULL, the default attributes are used.</p>
  </blockquote>