static inline int arch_read_trylock(arch_rwlock_t *lock) { atomic_t *count = (atomic_t *)lock;
if (atomic_dec_return(count) >= 0) return 1;
atomic_inc(count);
return 0; }