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

Re: [PATCH] public: add RING_NR_UNCONSUMED_*() macros to ring.h



On 26.11.21 10:17, Jan Beulich wrote:
On 26.11.2021 07:55, Juergen Gross wrote:
Today RING_HAS_UNCONSUMED_*() macros are returning the number of
unconsumed requests or responses instead of a boolean as the name of
the macros would imply.

As this "feature" is already being used, rename the macros to
RING_NR_UNCONSUMED_*() and define the RING_HAS_UNCONSUMED_*() macros
by using the new RING_NR_UNCONSUMED_*() macros. In order to avoid
future misuse let RING_HAS_UNCONSUMED_*() really return a boolean.

I don't think we can go this far; consumers of our headers may choose
to do so, but anyone taking the headers verbatim would be at risk of
getting screwed if they had any instance of abuse in their trees. IOW
I think the original-name macros ought to be direct aliases of the
new-name ones, and only in Linux'es clone you could then go further.

Fine with me. I'm inclined to add a comment hinting at that possibility
then.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.