[PATCH][BZ #16996] get_nprocs: Only return explictly set cache values
Meador Inge
meadori@codesourcery.com
Thu Jun 12 21:24:00 GMT 2014
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
More information about the Libc-alpha
mailing list