[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25408.1570091957@warthog.procyon.org.uk>
Date: Thu, 03 Oct 2019 09:39:17 +0100
From: David Howells <dhowells@...hat.com>
To: paulmck@...nel.org
Cc: dhowells@...hat.com, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org, mingo@...nel.org,
jiangshanlai@...il.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, edumazet@...gle.com, fweisbec@...il.com,
oleg@...hat.com, joel@...lfernandes.org,
Bart Van Assche <bart.vanassche@....com>,
Christoph Hellwig <hch@....de>, Hannes Reinecke <hare@...e.de>,
Johannes Thumshirn <jthumshirn@...e.de>,
Shane M Seymour <shane.seymour@....com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH tip/core/rcu 1/9] rcu: Upgrade rcu_swap_protected() to rcu_replace()
paulmck@...nel.org wrote:
> +#define rcu_replace(rcu_ptr, ptr, c) \
> +({ \
> + typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \
> + rcu_assign_pointer((rcu_ptr), (ptr)); \
> + __tmp; \
> +})
Does it make sense to actually use xchg() if that's supported by the arch?
David
Powered by blists - more mailing lists