advsync: Get rid of ACCESS_ONCE()
PATCH 1/1 advsync: Get rid of ACCESS_ONCE()
From 77ced05dd5df0aa61358643ae359e8afb5e731fc Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 8 Dec 2019 07:15:54 +0900
Subject: [PATCH] advsync: Get rid of ACCESS_ONCE()
Signed-off-by Akira Yokosawa <[email protected]>
--- advsync/advsync.tex | 2 +- advsync/rt.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
advsync/advsync.tex +1 -1
@@ -181,7 +181,7 @@ The linearizability criterion for NBS algorithms requires that reads from and updates to the array either use atomic instructions or be accompanied by memory barriers, but in the not-uncommon case where linearizability is not important, simple volatile loads and stores suffice, for example, -using \co{ACCESS_ONCE()}. +using \co{READ_ONCE()} and \co{WRITE_ONCE()}. An NBS set may also be implemented using a bitmap, where each value that might be a member of the set corresponds to one bit.
advsync/rt.tex +1 -1
@@ -1174,7 +1174,7 @@ void __rcu_read_unlock(void) \lnlbl[unl:b] barrier(); \lnlbl[unl:bar1] t->rcu_read_lock_nesting = INT_MIN; \lnlbl[unl:neg] barrier(); \lnlbl[unl:bar2] - if (ACCESS_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks] + if (READ_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks] rcu_read_unlock_special(t); \lnlbl[unl:unls] barrier(); \lnlbl[unl:bar3] t->rcu_read_lock_nesting = 0; \lnlbl[unl:zero]
Signature · 1 line
2.17.1
Paul E. McKenney
AppliedQuoted 6 lines · Akira Yokosawa
Quoted 1 line
From
77ced05dd5df0aa61358643ae359e8afb5e731fcMon Sep 17 00:00:00 2001From: Akira Yokosawa <[email protected]>
Date: Sun, 8 Dec 2019 07:15:54 +0900
Subject: [PATCH] advsync: Get rid ofACCESS_ONCE()Signed-off-by Akira Yokosawa <[email protected]>
Queued and pushed, good catch, thank you!
Thanx, Paul
Quoted 34 lines
--- advsync/advsync.tex | 2 +- advsync/rt.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)advsync/advsync.tex +1
-1@@ -181,7 +181,7 @@ The linearizability criterion for NBS algorithms requires that reads from and updates to the array either use atomic instructions or be accompanied by memory barriers, but in the not-uncommon case where linearizability is not important, simple volatile loads and stores suffice, for example, -using \co{ACCESS_ONCE()}. +using \co{READ_ONCE()} and \co{WRITE_ONCE()}. An NBS set may also be implemented using a bitmap, where each value that might be a member of the set corresponds to one bit.advsync/rt.tex +1
-1@@ -1174,7 +1174,7 @@ void __rcu_read_unlock(void) \lnlbl[unl:b] barrier(); \lnlbl[unl:bar1] t->rcu_read_lock_nesting = INT_MIN; \lnlbl[unl:neg] barrier(); \lnlbl[unl:bar2] - if (ACCESS_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks] + if (READ_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks] rcu_read_unlock_special(t); \lnlbl[unl:unls] barrier(); \lnlbl[unl:bar3] t->rcu_read_lock_nesting = 0; \lnlbl[unl:zero]Signature · 1 line
2.17.1