Re: [PATCH] ia64: Rewrite atomic_add and atomic_sub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]

  Powered by Linux