In the first go I saw the issue as real issue then I checked the structure of pthread_mutex_t which is as follows -
typedef struct {
int __m_reserved;
int __m_count;
_pthread_descr __m_owner;
int __m_kind;
struct _pthread_fastlock __m_lock;
} pthread_mutex_t;
Now see the third field only owner is suppose to modify this variable to avoid the contention (this is my interpretation only not verified)