Lines Matching refs:runcount
129 lock->runcount = 0; in glwthread_rwlock_init()
156 if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) in glwthread_rwlock_rdlock()
172 if (!(lock->runcount > 0)) in glwthread_rwlock_rdlock()
185 while (!(lock->runcount + 1 > 0)); in glwthread_rwlock_rdlock()
188 lock->runcount++; in glwthread_rwlock_rdlock()
213 if (!(lock->runcount == 0)) in glwthread_rwlock_wrlock()
229 if (!(lock->runcount == -1)) in glwthread_rwlock_wrlock()
242 while (!(lock->runcount == 0)); in glwthread_rwlock_wrlock()
245 lock->runcount--; /* runcount becomes -1 */ in glwthread_rwlock_wrlock()
275 if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) in glwthread_rwlock_tryrdlock()
281 lock->runcount++; in glwthread_rwlock_tryrdlock()
308 if (!(lock->runcount == 0)) in glwthread_rwlock_trywrlock()
314 lock->runcount--; /* runcount becomes -1 */ in glwthread_rwlock_trywrlock()
325 if (lock->runcount < 0) in glwthread_rwlock_unlock()
328 if (!(lock->runcount == -1)) in glwthread_rwlock_unlock()
330 lock->runcount = 0; in glwthread_rwlock_unlock()
335 if (!(lock->runcount > 0)) in glwthread_rwlock_unlock()
340 lock->runcount--; in glwthread_rwlock_unlock()
342 if (lock->runcount == 0) in glwthread_rwlock_unlock()
349 lock->runcount--; in glwthread_rwlock_unlock()
355 lock->runcount += lock->waiting_readers.count; in glwthread_rwlock_unlock()
368 if (lock->runcount != 0) in glwthread_rwlock_destroy()