On Wed, Jan 25, 2023 at 10:04:29PM +0100, Jonas Oberhauser wrote:I don't think they're necessarily implemented in a compatible way, so
Why invent new classes for them? They are literally the same operation
On 1/25/2023 9:21 PM, Alan Stern wrote:
(* Validate nesting *)[...]
flag ~empty Srcu-lock \ domain(srcu-rscs) as unmatched-srcu-lock
flag ~empty Srcu-unlock \ range(srcu-rscs) as unmatched-srcu-unlock
+flag ~empty (srcu-rscs^-1 ; srcu-rscs) \ id as multiple-srcu-matches
// SRCUHow do you feel about introducing Srcu-up and Srcu-down with this patch?
-srcu_read_lock(X) __srcu{srcu-lock}(X)
-srcu_read_unlock(X,Y) { __srcu{srcu-unlock}(X,Y); }
+srcu_read_lock(X) __load{srcu-lock}(*X)
+srcu_read_unlock(X,Y) { __store{srcu-unlock}(*X,Y); }
+srcu_down_read(X) __load{srcu-lock}(*X)
+srcu_up_read(X,Y) { __store{srcu-unlock}(*X,Y); }
as Srcu-lock and Srcu-unlock; the only difference is how the kernel's
lockdep checker treats them.