Lines Matching defs:rwl
46 pthread_rwlock_t rwl;
69 rwl = *rwlock;
71 if (rwl->nMagic != PTW32_RWLOCK_MAGIC)
76 if ((result = pthread_mutex_trylock (&(rwl->mtxExclusiveAccess))) != 0)
82 pthread_mutex_trylock (&(rwl->mtxSharedAccessCompleted))) != 0)
84 result1 = pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));
88 if (rwl->nExclusiveAccessCount == 0)
90 if (rwl->nCompletedSharedAccessCount > 0)
92 rwl->nSharedAccessCount -= rwl->nCompletedSharedAccessCount;
93 rwl->nCompletedSharedAccessCount = 0;
96 if (rwl->nSharedAccessCount > 0)
99 pthread_mutex_unlock (&(rwl->mtxSharedAccessCompleted))) != 0)
101 (void) pthread_mutex_unlock (&(rwl->mtxExclusiveAccess));
106 pthread_mutex_unlock (&(rwl->mtxExclusiveAccess))) == 0)
113 rwl->nExclusiveAccessCount = 1;