This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement membarrier function
- From: Florian Weimer <fweimer at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 05 Dec 2018 15:51:42 +0100
- Subject: Re: [PATCH] Linux: Implement membarrier function
- References: <8736rldyzm.fsf@oldenburg.str.redhat.com> <98842c25-ec63-b793-08b3-539c32a9922a@linaro.org>
* 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.
> 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.
Thanks,
Florian