1 #include "pthread_impl.h"
3 int __pthread_rwlock_tryrdlock(pthread_rwlock_t
*rw
)
8 cnt
= val
& 0x7fffffff;
9 if (cnt
== 0x7fffffff) return EBUSY
;
10 if (cnt
== 0x7ffffffe) return EAGAIN
;
11 } while (a_cas(&rw
->_rw_lock
, val
, val
+1) != val
);
15 weak_alias(__pthread_rwlock_tryrdlock
, pthread_rwlock_tryrdlock
);