/external/chromium_org/native_client_sdk/src/libraries/third_party/pthreads-win32/ |
D | pthread_rwlock_wrlock.c | 46 pthread_rwlock_t rwl; in pthread_rwlock_wrlock() local 69 rwl = *rwlock; in pthread_rwlock_wrlock() 71 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_wrlock() 76 if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0) in pthread_rwlock_wrlock() 81 if ((result = pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_wrlock() 83 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_wrlock() 87 if (rwl->nExclusiveAccessCount == 0) in pthread_rwlock_wrlock() 89 if (rwl->nCompletedSharedAccessCount > 0) in pthread_rwlock_wrlock() 91 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_wrlock() 92 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_wrlock() [all …]
|
D | pthread_rwlock_timedwrlock.c | 47 pthread_rwlock_t rwl; in pthread_rwlock_timedwrlock() local 70 rwl = *rwlock; in pthread_rwlock_timedwrlock() 72 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_timedwrlock() 78 pthread_mutex_timedlock (&(rwl->mtxExclusiveAccess), abstime)) != 0) in pthread_rwlock_timedwrlock() 84 pthread_mutex_timedlock (&(rwl->mtxSharedAccessCompleted), in pthread_rwlock_timedwrlock() 87 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_timedwrlock() 91 if (rwl->nExclusiveAccessCount == 0) in pthread_rwlock_timedwrlock() 93 if (rwl->nCompletedSharedAccessCount > 0) in pthread_rwlock_timedwrlock() 95 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_timedwrlock() 96 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_timedwrlock() [all …]
|
D | pthread_rwlock_destroy.c | 45 pthread_rwlock_t rwl; in pthread_rwlock_destroy() local 55 rwl = *rwlock; in pthread_rwlock_destroy() 57 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_destroy() 62 if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0) in pthread_rwlock_destroy() 68 pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_destroy() 70 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_destroy() 78 if (rwl->nExclusiveAccessCount > 0 in pthread_rwlock_destroy() 79 || rwl->nSharedAccessCount > rwl->nCompletedSharedAccessCount) in pthread_rwlock_destroy() 81 result = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted)); in pthread_rwlock_destroy() 82 result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_destroy() [all …]
|
D | pthread_rwlock_trywrlock.c | 46 pthread_rwlock_t rwl; in pthread_rwlock_trywrlock() local 69 rwl = *rwlock; in pthread_rwlock_trywrlock() 71 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_trywrlock() 76 if ((result = pthread_mutex_trylock (&(rwl->mtxExclusiveAccess))) != 0) in pthread_rwlock_trywrlock() 82 pthread_mutex_trylock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_trywrlock() 84 result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_trywrlock() 88 if (rwl->nExclusiveAccessCount == 0) in pthread_rwlock_trywrlock() 90 if (rwl->nCompletedSharedAccessCount > 0) in pthread_rwlock_trywrlock() 92 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_trywrlock() 93 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_trywrlock() [all …]
|
D | pthread_rwlock_init.c | 47 pthread_rwlock_t rwl = 0; in pthread_rwlock_init() local 60 rwl = (pthread_rwlock_t) calloc (1, sizeof (*rwl)); in pthread_rwlock_init() 62 if (rwl == NULL) in pthread_rwlock_init() 68 rwl->nSharedAccessCount = 0; in pthread_rwlock_init() 69 rwl->nExclusiveAccessCount = 0; in pthread_rwlock_init() 70 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_init() 72 result = pthread_mutex_init (&rwl->mtxExclusiveAccess, NULL); in pthread_rwlock_init() 78 result = pthread_mutex_init (&rwl->mtxSharedAccessCompleted, NULL); in pthread_rwlock_init() 84 result = pthread_cond_init (&rwl->cndSharedAccessCompleted, NULL); in pthread_rwlock_init() 90 rwl->nMagic = PTW32_RWLOCK_MAGIC; in pthread_rwlock_init() [all …]
|
D | pthread_rwlock_timedrdlock.c | 47 pthread_rwlock_t rwl; in pthread_rwlock_timedrdlock() local 70 rwl = *rwlock; in pthread_rwlock_timedrdlock() 72 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_timedrdlock() 78 pthread_mutex_timedlock (&(rwl->mtxExclusiveAccess), abstime)) != 0) in pthread_rwlock_timedrdlock() 83 if (++rwl->nSharedAccessCount == INT_MAX) in pthread_rwlock_timedrdlock() 86 pthread_mutex_timedlock (&(rwl->mtxSharedAccessCompleted), in pthread_rwlock_timedrdlock() 91 ++rwl->nCompletedSharedAccessCount; in pthread_rwlock_timedrdlock() 93 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_timedrdlock() 97 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_timedrdlock() 98 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_timedrdlock() [all …]
|
D | pthread_rwlock_tryrdlock.c | 46 pthread_rwlock_t rwl; in pthread_rwlock_tryrdlock() local 69 rwl = *rwlock; in pthread_rwlock_tryrdlock() 71 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_tryrdlock() 76 if ((result = pthread_mutex_trylock (&(rwl->mtxExclusiveAccess))) != 0) in pthread_rwlock_tryrdlock() 81 if (++rwl->nSharedAccessCount == INT_MAX) in pthread_rwlock_tryrdlock() 84 pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_tryrdlock() 86 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_tryrdlock() 90 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_tryrdlock() 91 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_tryrdlock() 94 pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_tryrdlock() [all …]
|
D | pthread_rwlock_rdlock.c | 46 pthread_rwlock_t rwl; in pthread_rwlock_rdlock() local 69 rwl = *rwlock; in pthread_rwlock_rdlock() 71 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_rdlock() 76 if ((result = pthread_mutex_lock (&(rwl->mtxExclusiveAccess))) != 0) in pthread_rwlock_rdlock() 81 if (++rwl->nSharedAccessCount == INT_MAX) in pthread_rwlock_rdlock() 84 pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_rdlock() 86 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in pthread_rwlock_rdlock() 90 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount; in pthread_rwlock_rdlock() 91 rwl->nCompletedSharedAccessCount = 0; in pthread_rwlock_rdlock() 94 pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_rdlock() [all …]
|
D | pthread_rwlock_unlock.c | 46 pthread_rwlock_t rwl; in pthread_rwlock_unlock() local 61 rwl = *rwlock; in pthread_rwlock_unlock() 63 if (rwl->nMagic != PTW32_RWLOCK_MAGIC) in pthread_rwlock_unlock() 68 if (rwl->nExclusiveAccessCount == 0) in pthread_rwlock_unlock() 71 pthread_mutex_lock (&(rwl->mtxSharedAccessCompleted))) != 0) in pthread_rwlock_unlock() 76 if (++rwl->nCompletedSharedAccessCount == 0) in pthread_rwlock_unlock() 78 result = pthread_cond_signal (&(rwl->cndSharedAccessCompleted)); in pthread_rwlock_unlock() 81 result1 = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted)); in pthread_rwlock_unlock() 85 rwl->nExclusiveAccessCount--; in pthread_rwlock_unlock() 87 result = pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted)); in pthread_rwlock_unlock() [all …]
|
D | ptw32_rwlock_cancelwrwait.c | 43 pthread_rwlock_t rwl = (pthread_rwlock_t) arg; in ptw32_rwlock_cancelwrwait() local 45 rwl->nSharedAccessCount = -rwl->nCompletedSharedAccessCount; in ptw32_rwlock_cancelwrwait() 46 rwl->nCompletedSharedAccessCount = 0; in ptw32_rwlock_cancelwrwait() 48 (void) pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted)); in ptw32_rwlock_cancelwrwait() 49 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess)); in ptw32_rwlock_cancelwrwait()
|
/external/valgrind/main/helgrind/tests/ |
D | tc12_rwl_trivial.c | 22 pthread_rwlock_t rwl; in main() local 24 r = pthread_rwlock_init( &rwl, NULL ); assert(r == 0); in main() 26 r = pthread_rwlock_wrlock( &rwl ); assert(r == 0); in main() 27 r = pthread_rwlock_unlock( &rwl ); assert(r == 0); in main() 29 r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); in main() 30 r = pthread_rwlock_rdlock( &rwl ); assert(r == 0); in main() 31 r = pthread_rwlock_unlock( &rwl ); assert(r == 0); in main() 32 r = pthread_rwlock_unlock( &rwl ); assert(r == 0); in main() 35 r = pthread_rwlock_unlock( &rwl ); assert(OS_IS_DARWIN || r == 0); in main() 37 r = pthread_rwlock_destroy( &rwl ); assert(r == 0); in main()
|
D | tc23_bogus_condwait.c | 11 pthread_cond_t cv; pthread_rwlock_t rwl; variable 57 r= pthread_rwlock_init(&rwl, NULL); assert(!r); in main() 75 r= pthread_cond_wait(&cv, (pthread_mutex_t*)&rwl ); in main()
|
D | tc20_verifywrap.c | 47 pthread_rwlock_t rwl; in main() local 178 r= pthread_rwlock_init( &rwl, NULL ); assert(!r); in main() 179 r= pthread_rwlock_unlock( &rwl ); in main()
|
/external/valgrind/main/helgrind/ |
D | hg_intercepts.c | 1314 static int pthread_rwlock_init_WRK(pthread_rwlock_t *rwl, in pthread_rwlock_init_WRK() argument 1321 fprintf(stderr, "<< pthread_rwl_init %p", rwl); fflush(stderr); in pthread_rwlock_init_WRK() 1324 CALL_FN_W_WW(ret, fn, rwl,attr); in pthread_rwlock_init_WRK() 1328 pthread_rwlock_t*,rwl); in pthread_rwlock_init_WRK() 1340 pthread_rwlock_t *rwl, in PTH_FUNC() argument 1342 return pthread_rwlock_init_WRK(rwl, attr); in PTH_FUNC() 1346 pthread_rwlock_t *rwl, in PTH_FUNC() argument 1348 return pthread_rwlock_init_WRK(rwl, attr); in PTH_FUNC() 1361 static int pthread_rwlock_destroy_WRK(pthread_rwlock_t* rwl) in pthread_rwlock_destroy_WRK() argument 1367 fprintf(stderr, "<< pthread_rwl_destroy %p", rwl); fflush(stderr); in pthread_rwlock_destroy_WRK() [all …]
|
D | hg_main.c | 2398 void evh__HG_PTHREAD_RWLOCK_INIT_POST( ThreadId tid, void* rwl ) in evh__HG_PTHREAD_RWLOCK_INIT_POST() argument 2402 (Int)tid, (void*)rwl ); in evh__HG_PTHREAD_RWLOCK_INIT_POST() 2403 map_locks_lookup_or_create( LK_rdwr, (Addr)rwl, tid ); in evh__HG_PTHREAD_RWLOCK_INIT_POST() 2409 void evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( ThreadId tid, void* rwl ) in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE() argument 2415 (Int)tid, (void*)rwl ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE() 2421 lk = map_locks_maybe_lookup( (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE() 2430 tl_assert( lk->guestaddr == (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE() 2457 void* rwl, in evh__HG_PTHREAD_RWLOCK_LOCK_PRE() argument 2466 (Int)tid, (Int)isW, (void*)rwl ); in evh__HG_PTHREAD_RWLOCK_LOCK_PRE() 2473 lk = map_locks_maybe_lookup( (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_LOCK_PRE() [all …]
|
/external/valgrind/main/ |
D | configure.in | 932 pthread_rwlock_t rwl;
|