Re: [PATCH v3] locking/qrwlock: Let qrwlock has same layout regardless of the endian

From: Peter Zijlstra
Date: Wed Jul 13 2016 - 16:41:21 EST


On Wed, Jul 13, 2016 at 09:54:23PM +0200, Peter Zijlstra wrote:

> Urgh, I hate this stuff :/

> + * Writer states & reader shift and bias.
> + *
> + * | +0 | +1 | +2 | +3 |
> + * ----+----+----+----+----+
> + * LE | 12 | 34 | 56 | 78 | 0x12345678
> + * ----+----+----+----+----+
> + * BE | 78 | 56 | 34 | 12 | 0x12345678
> + * ----+----+----+----+----+

And of course I got that wrong.. its 0x78563412 in both cases.