1#include "pthread_impl.h"
2
3int pthread_mutex_consistent(pthread_mutex_t *m)
4{
5	if (!(m->_m_type & 8)) return EINVAL;
6	if ((m->_m_lock & 0x7fffffff) != __pthread_self()->tid)
7		return EPERM;
8	m->_m_type &= ~8U;
9	return 0;
10}
11