Re: write barriers - Was: Re: [RFC][PATCH] problem of cont_prepare_write()

From: Florian Weimer
Date: Thu Jan 13 2005 - 13:20:50 EST


* Chris Friesen:

> I believe so. You may also need to cast them as volatile to prevent the
> compiler from reordering--can someone with more gcc knowledge than I
> state definitively whether or not it is smart enough to not reorder
> barriers?

If you define it properly, GCC won't reorder it (volatile __asm__ with
memory operands should be sufficient).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/