[PATCH] Linux: Implement membarrier function
Florian Weimer
fweimer@redhat.com
Wed Dec 5 14:51:00 GMT 2018
* 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
More information about the Libc-alpha
mailing list