23 #ifndef GRAPHLAB_MUTEX_HPP
24 #define GRAPHLAB_MUTEX_HPP
28 #include <graphlab/logger/assertions.hpp>
42 mutable pthread_mutex_t m_mut;
46 int error = pthread_mutex_init(&m_mut, NULL);
54 int error = pthread_mutex_init(&m_mut, NULL);
59 int error = pthread_mutex_destroy( &m_mut );
64 void operator=(
const mutex& m) { }
68 int error = pthread_mutex_lock( &m_mut );
74 int error = pthread_mutex_unlock( &m_mut );
79 return pthread_mutex_trylock( &m_mut ) == 0;