diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-08-17 15:20:55 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-08-17 15:20:55 +0200 |
commit | 8f3c4517b1fff965f2bdedcf376dcfd91cda422b (patch) | |
tree | 139c56f37270a56083052602196221be698c5ee3 /gcc/rust | |
parent | 84a5be47f8e13839efdf0e06f02ef1a0cacf5e34 (diff) | |
download | gcc-8f3c4517b1fff965f2bdedcf376dcfd91cda422b.zip gcc-8f3c4517b1fff965f2bdedcf376dcfd91cda422b.tar.gz gcc-8f3c4517b1fff965f2bdedcf376dcfd91cda422b.tar.bz2 |
libgomp: call numa_available first when using libnuma
The documentation requires that numa_available() is called and only
when successful, other libnuma function may be called. Internally,
it does a syscall to get_mempolicy with flag=0 (which would return
the default policy if mode were not NULL). If this returns -1 (and
not 0) and errno == ENOSYS, the Linux kernel does not have the
get_mempolicy syscall function; if so, numa_available() returns -1
(otherwise: 0).
libgomp/
PR libgomp/111024
* allocator.c (gomp_init_libnuma): Call numa_available; if
not available or not returning 0, disable libnuma usage.
Diffstat (limited to 'gcc/rust')
0 files changed, 0 insertions, 0 deletions