#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock)
typedef struct {
- volatile int read_counter : 31;
- volatile int write_lock : 1;
+ volatile unsigned int read_counter : 31;
+ volatile unsigned int write_lock : 1;
} rwlock_t;
#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }