Christian Borntraeger <borntrae...@de.ibm.com> wrote:

> +#define get_scalar_volatile_pointer(x) ({ \
> +     typeof(x) *__p = &(x); \
> +     volatile typeof(x) *__vp = __p; \
> +     (void)(long)*__p; __vp; })
> +#define ACCESS_ONCE(x) (*get_scalar_volatile_pointer(x))

Might this cause two loads from memory under some conditions?  Once for the
fourth line and once for the fifth?

(Apologies if this has already been discussed)

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to