26 bool freeAttr =
false;
29 pthread_mutexattr_t attr;
30 int rc = pthread_mutexattr_init(&attr);
40 rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
50 rc = pthread_mutex_init(&mMutex, &attr);
61 rc = pthread_mutexattr_destroy(&attr);
74 rc = pthread_mutex_destroy(&mMutex);
88 if (mOwner && (mOwner == pthread_self()))
99 if (timeout == 0xffffffff)
101 ts.tv_sec += 60 * 60 * 24 * 365;
106 uint64_t bigtimeout = (uint64_t) timeout *
MIL_2_NSEC;
108 ts.tv_nsec += bigtimeout %
MAX_NSEC;
127 mOwner = pthread_self();
137 if (mOwner != pthread_self())
151 pthread_mutex_unlock(&mMutex);