call for API review: new bitstring functions

Matthew Dillon dillon at apollo.backplane.com
Sun Jan 4 11:56:57 PST 2004


:the return result.
:
:> Apart from that I dislike the naming a bit and would rather go for:
:> bit_rffs(), bit_rfls() ... as it is already used for the bit_n*-class
:> functions.
:
:Yes, this would be the consistent thing to do.  But I just have a hard
:time remembering what rffs and rfls mean.  And I wrote them!
:
:I find your consistency argument to be compelling. In light of the
:consistency argument, I think it would be better not to shoehorn these
:new functions into the existhing bitstring API. The new plan is to name
:the functions bitrange_firstset() and bitrange_lastset() and either keep 
:them internal
:to the one file where they're going to be used or to declare them in 
:<sys/bitrange.h>.
:
:Thanks.
:								Jeffrey

    I don't quite see the logic of this.  If your functions are roughly
    equivalent to the ones already in the bitstring API, just with a 
    different (more efficient) style of argument and return value handling,
    then they should be made part of the API.  You are adding unnecessary
    complexity by creating a new framework to house the functions.

    I think they should be placed within the existing bitstring API.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list