27 bool freeAttr =
false;
30 pthread_mutexattr_t attr;
31 int rc = pthread_mutexattr_init(&attr);
41 rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
51 rc = pthread_mutex_init(&mMutex, &attr);
62 rc = pthread_mutexattr_destroy(&attr);
77 rc = pthread_mutex_destroy(&mMutex);
93 if (mOwner && (mOwner == pthread_self()))
104 if (timeout == 0xffffffff)
106 ts.tv_sec += 60 * 60 * 24 * 365;
111 uint64_t bigtimeout = (uint64_t) timeout *
MIL_2_NSEC;
113 ts.tv_nsec += bigtimeout %
MAX_NSEC;
132 mOwner = pthread_self();
146 if (mOwner != pthread_self())
160 pthread_mutex_unlock(&mMutex);