diff options
| author | 2011-06-08 16:01:34 +0200 | |
|---|---|---|
| committer | 2011-06-08 16:01:34 +0200 | |
| commit | a61944c251c3e68c4bbf6eb96ff61c7b286351c5 (patch) | |
| tree | fd9f82297805d043a45a828626dfd29bddc48b00 /include/linux/seqlock.h | |
| parent | Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfig (diff) | |
| parent | Linux 3.0-rc1 (diff) | |
Merge commit 'v3.0-rc1' into kbuild/kconfig
Diffstat (limited to 'include/linux/seqlock.h')
| -rw-r--r-- | include/linux/seqlock.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index e98cd2e57194..e9811892844f 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -41,9 +41,6 @@ typedef struct { #define __SEQLOCK_UNLOCKED(lockname) \ { 0, __SPIN_LOCK_UNLOCKED(lockname) } -#define SEQLOCK_UNLOCKED \ - __SEQLOCK_UNLOCKED(old_style_seqlock_init) - #define seqlock_init(x) \ do { \ (x)->sequence = 0; \ @@ -88,12 +85,12 @@ static __always_inline unsigned read_seqbegin(const seqlock_t *sl) unsigned ret; repeat: - ret = sl->sequence; - smp_rmb(); + ret = ACCESS_ONCE(sl->sequence); if (unlikely(ret & 1)) { cpu_relax(); goto repeat; } + smp_rmb(); return ret; } |
