This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use __builtin_popcount in __sched_cpucount [BZ #21696]


On Sat, Jul 1, 2017 at 7:26 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 07/01/2017 04:12 PM, H.J. Lu wrote:
>> posix/sched_cpucount.c assumes that size of __cpu_mask == size of long,
>> which is incorrect for x32.  This patch uses __builtin_popcount, which
>> is availabe in GCC 4.9, in posix/sched_cpucount.c.
>>
>> Tested on i686, x86-64 and x32 with multi-arch disabled.
>>
>> 2017-07-01  Florian Weimer  <fweimer@redhat.com>
>>           H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       [BZ #21696]
>>       * posix/sched_cpucount.c: Don't include <limits.h>.
>>       (__sched_cpucount): Use __builtin_popcount.
>
> Patch looks good to me.  Thanks.
>

Checked it in.

Thanks.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]