This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement per-thread file system attributes
On 6/28/19 3:19 PM, Florian Weimer wrote:
> * Carlos O'Donell:
>
>> On 6/28/19 2:34 PM, Florian Weimer wrote:
>>> * Carlos O'Donell:
>>>
>>>>> if (flag != PTHREAD_PER_THREAD_NP)
>>>>> TEST_COMPARE (flag, PTHREAD_PER_PROCESS_NP);
>>>>
>>>> I don't follow why you can't call this unconditionally?
>>>
>>> This asserts that the flag has one of two values, PTHREAD_PER_THREAD_NP
>>> or PTHREAD_PER_PROCESS_NP.
>>
>> I still don't follow.
>>
>> Why can't we just use:
>>
>> TEST_COMPARE (flag, PTHREAD_PER_PROCESS_NP);
>>
>> We only expect flag to be PTHREAD_PER_PROCESS_NP.
>
> No, the flag can be both, and the returned boolean changes as the
> result.
Ah! OK, I missed that bit of logic in the test.
--
Cheers,
Carlos.