Lines Matching refs:thiz

44 void object_lock_exclusive_(IObject *thiz, const char *file, int line)  in object_lock_exclusive_()  argument
47 ok = pthread_mutex_trylock(&thiz->mMutex); in object_lock_exclusive_()
50 int32_t oldGeneration = thiz->mGeneration; in object_lock_exclusive_()
59 ok = pthread_mutex_timedlock(&thiz->mMutex, &ts); in object_lock_exclusive_()
73 int32_t newGeneration = thiz->mGeneration; in object_lock_exclusive_()
83 pthread_t owner = thiz->mOwner; in object_lock_exclusive_()
87 " (tid %d) at %s:%d\n", file, line, *(void **)&me, gettid(), thiz, in object_lock_exclusive_()
88 *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
92 ok = pthread_mutex_lock(&thiz->mMutex); in object_lock_exclusive_()
101 if (0 != memcmp(&zero, &thiz->mOwner, sizeof(pthread_t))) { in object_lock_exclusive_()
103 pthread_t owner = thiz->mOwner; in object_lock_exclusive_()
107 " %p (tid %d) at %s:%d\n", file, line, *(void **)&me, gettid(), thiz, in object_lock_exclusive_()
108 *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
112 thiz, *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
116 thiz->mOwner = pthread_self(); in object_lock_exclusive_()
117 thiz->mFile = file; in object_lock_exclusive_()
118 thiz->mLine = line; in object_lock_exclusive_()
120 ++thiz->mGeneration; in object_lock_exclusive_()
123 void object_lock_exclusive(IObject *thiz) in object_lock_exclusive() argument
126 ok = pthread_mutex_lock(&thiz->mMutex); in object_lock_exclusive()
135 void object_unlock_exclusive_(IObject *thiz, const char *file, int line) in object_unlock_exclusive_() argument
137 assert(pthread_equal(pthread_self(), thiz->mOwner)); in object_unlock_exclusive_()
138 assert(NULL != thiz->mFile); in object_unlock_exclusive_()
139 assert(0 != thiz->mLine); in object_unlock_exclusive_()
140 memset(&thiz->mOwner, 0, sizeof(pthread_t)); in object_unlock_exclusive_()
141 thiz->mFile = file; in object_unlock_exclusive_()
142 thiz->mLine = line; in object_unlock_exclusive_()
144 ok = pthread_mutex_unlock(&thiz->mMutex); in object_unlock_exclusive_()
148 void object_unlock_exclusive(IObject *thiz) in object_unlock_exclusive() argument
151 ok = pthread_mutex_unlock(&thiz->mMutex); in object_unlock_exclusive()
162 void object_unlock_exclusive_attributes_(IObject *thiz, unsigned attributes, in object_unlock_exclusive_attributes_() argument
165 void object_unlock_exclusive_attributes(IObject *thiz, unsigned attributes) in object_unlock_exclusive_attributes_()
170 assert(pthread_equal(pthread_self(), thiz->mOwner)); in object_unlock_exclusive_attributes_()
171 assert(NULL != thiz->mFile); in object_unlock_exclusive_attributes_()
172 assert(0 != thiz->mLine); in object_unlock_exclusive_attributes_()
178 SLuint32 objectID = IObjectToObjectID(thiz); in object_unlock_exclusive_attributes_()
200 asynchronous &= ~(*handler)(thiz); in object_unlock_exclusive_attributes_()
207 unsigned oldAttributesMask = thiz->mAttributesMask; in object_unlock_exclusive_attributes_()
208 thiz->mAttributesMask = oldAttributesMask | asynchronous; in object_unlock_exclusive_attributes_()
221 CAudioPlayer *ap = (CAudioPlayer *) thiz; in object_unlock_exclusive_attributes_()
237 memset(&thiz->mOwner, 0, sizeof(pthread_t)); in object_unlock_exclusive_attributes_()
238 thiz->mFile = file; in object_unlock_exclusive_attributes_()
239 thiz->mLine = line; in object_unlock_exclusive_attributes_()
241 ok = pthread_mutex_unlock(&thiz->mMutex); in object_unlock_exclusive_attributes_()
249 CAudioPlayer *ap = (CAudioPlayer *) thiz; in object_unlock_exclusive_attributes_()
270 unsigned id = thiz->mInstanceID; in object_unlock_exclusive_attributes_()
274 IEngine *thisEngine = &thiz->mEngine->mEngine; in object_unlock_exclusive_attributes_()
288 void object_cond_wait_(IObject *thiz, const char *file, int line) in object_cond_wait_() argument
291 assert(pthread_equal(pthread_self(), thiz->mOwner)); in object_cond_wait_()
292 assert(NULL != thiz->mFile); in object_cond_wait_()
293 assert(0 != thiz->mLine); in object_cond_wait_()
294 memset(&thiz->mOwner, 0, sizeof(pthread_t)); in object_cond_wait_()
295 thiz->mFile = file; in object_cond_wait_()
296 thiz->mLine = line; in object_cond_wait_()
299 ok = pthread_cond_wait(&thiz->mCond, &thiz->mMutex); in object_cond_wait_()
302 thiz->mOwner = pthread_self(); in object_cond_wait_()
303 thiz->mFile = file; in object_cond_wait_()
304 thiz->mLine = line; in object_cond_wait_()
307 void object_cond_wait(IObject *thiz) in object_cond_wait() argument
310 ok = pthread_cond_wait(&thiz->mCond, &thiz->mMutex); in object_cond_wait()
318 void object_cond_signal(IObject *thiz) in object_cond_signal() argument
321 ok = pthread_cond_signal(&thiz->mCond); in object_cond_signal()
330 void object_cond_broadcast(IObject *thiz) in object_cond_broadcast() argument
333 ok = pthread_cond_broadcast(&thiz->mCond); in object_cond_broadcast()