Re: [PATCH] ia64: Rewrite atomic_add and atomic_sub
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Subject: Re: [PATCH] ia64: Rewrite atomic_add and atomic_sub
- From: "Luck, Tony" <tony.luck@xxxxxxxxx>
- Date: Thu, 18 Jan 2018 11:02:43 -0800
- Cc: linux-ia64@xxxxxxxxxxxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>, Jakub Jelinek <jakub@xxxxxxxxxx>
- In-reply-to: <20180118183953.29257-1-willy@infradead.org>
- References: <20180118183953.29257-1-willy@infradead.org>
- User-agent: NeoMutt/20170609 (1.8.3)
On Thu, Jan 18, 2018 at 10:39:53AM -0800, Matthew Wilcox wrote:
> + int __i = (i); \
> + static const int __ia64_atomic_p = __ia64_atomic_const(i); \
> + __ia64_atomic_p ? ia64_fetch_and_add(__i, &(v)->counter) : \
> + ia64_atomic_add(__i, v); \
"static"? Is that safe? What if we are executing
atomic_add on multiple cpus at the same time?
Do all those "static" declarations resolve to separate
memory locations per call site?
-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]