Le 26/03/13 05:57, Vicente J. Botet Escriba a écrit :I guess that I have the answer why HH wrote the code like this. Portability, if unsigned is 64 bits, your bitfield patch can not take advantage of it as you need to give the number of bits
I appreciate your efforts going to a more understandable code. I don't know why HH has written the code like that, but usually he has good reasons.
+ n_readers_ : 31;
Or can you?
In order to ensure the same performance, what about a patch using getters/setters instead of the direct use of the bitfields, and define these functions either using the current code either using the bitfields so that we can have both and compare easily.
Anyway, forget the patch I will do it myself using inline functions.