This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement membarrier function
On 05/12/2018 12:51, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> If we are replicating the values, meaning the idea is to keep it sync at least
>> when we have the minimum supported kernel of 4.16, why just not add a comment
>> to add linux/membarrier.h once the minimum supported kernel provides this
>> header and not rely on linux/membarrier.h?
>
> This way, we can compile the test with any supported kernel headers for
> glibc.
>
> If we defer to <linux/membarrier.h> unconditionally, we cannot build the
> test with all kernel headers. The current approach definitely makes the
> test case much cleaner.
>
My point is exactly to *not* rely on kernel headers.
>> Also I think the minimum kernel that provides this header is 4.3, however
>> by using 4.3 as the condition to include the kernel header in add another
>> issue which is glibc will have different semantic depending of the installed
>> header. This fallback enum definition is also lacking MEMBARRIER_CMD_SHARED,
>> and although is provided by kernel headers just for compatibility, it is
>> another interface difference it has depending of the installed kernel
>> header.
>
> MEMBARRIER_CMD_SHARED is included.
>
Right, my mistake here.