static inline int arch_write_trylock(arch_rwlock_t *lock) { atomic_t *count = (atomic_t *)lock;
if (atomic_sub_and_test(RW_LOCK_BIAS, count)) return 1;
atomic_add(RW_LOCK_BIAS, count);
return 0; }
メニュー編集
新規作成用