static inline voidrwlock_rlock(struct rwlock *lock) { for (;;) { while(lock->write) { __sync_synchronize(); } __sync_add_and_fetch(&lock->read,1); if (lock->write) { __sync_sub_an 『More』
云风大哥 能解释下吗 我还是不能理解感觉while(lock->write) { __sync_synchronize(); }有点多余