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

Re: [PATCH 8/9] lib: move bsearch code



On 22.09.2020 21:34, Andrew Cooper wrote:
> On 14/09/2020 11:18, Jan Beulich wrote:
>> Build this code into an archive, which results in not linking it into
>> x86 final binaries. This saves a little bit of dead code.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> This wants to be an extern inline in the header file just like in stdlib.h.

I can move it there, but why "extern" rather than "static"? We're
not at risk of conflicting with a C library implementation.

> The implementation is trivial, and much faster when the compiler can
> inline the cmp() function pointer.
> 
> I doubt we actually need out-of-line implementation (except perhaps for
> CONFIG_UBSAN builds or so).

The only references are in Arm code; I don't know enough of UBSAN to
see why uses may appear there.

Jan



 


Rackspace

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