Hi,<br><br>  I'm confused by the comment and the source code of lib/Support/Mutex.cpp<br>and lib/Support/RWMutex.cpp.  In these files there are:<br><br>// This variable is useful for situations where the pthread library has been<br>
// compiled with weak linkage for its interface symbols. This allows the<br>// threading support to be turned off by simply <b>not linking against -lpthread</b>.<br>// In that situation, the value of <b>pthread_mutex_init</b> will be 0 and<br>
// consequently pthread_enabled will be false. In such situations, all the<br>// ...<br>static const bool pthread_enabled = <b>true</b>;<br><br>  But pthread_enabled has no relation with pthread_mutex_init.  I've check<br>
the log, pthread_enabled has been assigned to true since 2006.  It was:<br><br>static const bool pthread_enabled = <b>static_cast<bool>(pthread_mutex_init)</b>;<br><br><b>  Shall we update or remove the comment?</b><br>
<br>  Note: If we rollback the code, then 2 warnings will be generated:<br><br>lib/Support/Mutex.cpp:55: warning: the address of ‘int pthread_mutex_init(<br>pthread_mutex_t*, const pthread_mutexattr_t*)’ will always evaluate as ‘true’<br>
<br>lib/Support/RWMutex.cpp:57: warning: the address of ‘int pthread_mutex_init(<br>pthread_mutex_t*, const pthread_mutexattr_t*)’ will always evaluate as ‘true’<br><br><br>  Thanks,<br><br><div style="text-align: right;">
Logan<br></div>