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][BZ #16996] get_nprocs: Only return explictly set cache values


On 06/12/2014 03:54 PM, Siddhesh Poyarekar wrote:

> Oh yes, so:
> 
>     (now == prev && now != 0)

That is indeed simpler and fixes the correctness issue, but now caching is
disabled for the 'time (NULL) == 0' case.  Therefore two close call to
'get_nprocs' at that time point will cause the value to be computed both times.
I prefer the first patch where correctness and the caching behavior is
maintained, but I understand if others value the simpler approach that
sacrifices a caching corner-case while still fixing correctness.

-- 
Meador Inge
CodeSourcery / Mentor Embedded


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