diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-07-09 11:29:30 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-07-09 11:29:30 +0200 |
commit | ea82325afeccf3604f393916832eaadcbe1225bd (patch) | |
tree | 7e61a4ef6bf9b4095e86428c7e9b74ca848cb31e /libgomp/allocator.c | |
parent | edf95e51e53697f3050f076675c26a4cece17741 (diff) | |
download | gcc-ea82325afeccf3604f393916832eaadcbe1225bd.zip gcc-ea82325afeccf3604f393916832eaadcbe1225bd.tar.gz gcc-ea82325afeccf3604f393916832eaadcbe1225bd.tar.bz2 |
openmp: Change omp_atv_default value and rename omp_atv_sequential to omp_atv_serialized.
While this is an OpenMP 5.1 change, it is undesirable to let people use different
values and then deal with ABI backwards compatibility in a year or two.
2020-07-09 Jakub Jelinek <jakub@redhat.com>
* omp.h.in (omp_alloctrait_value_t): Change omp_atv_default from
2 to -1. Add omp_atv_serialized and define omp_atv_sequential using
it. Remove __omp_alloctrait_value_max__.
* allocator.c (omp_init_allocator): Handle omp_atv_default for
omp_atk_alignment and omp_atk_pool_size.
Diffstat (limited to 'libgomp/allocator.c')
-rw-r--r-- | libgomp/allocator.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libgomp/allocator.c b/libgomp/allocator.c index 4e29399..76feba7 100644 --- a/libgomp/allocator.c +++ b/libgomp/allocator.c @@ -90,6 +90,11 @@ omp_init_allocator (omp_memspace_handle_t memspace, int ntraits, } break; case omp_atk_alignment: + if (traits[i].value == omp_atv_default) + { + data.alignment = 1; + break; + } if ((traits[i].value & (traits[i].value - 1)) != 0 || !traits[i].value) return omp_null_allocator; @@ -112,7 +117,10 @@ omp_init_allocator (omp_memspace_handle_t memspace, int ntraits, } break; case omp_atk_pool_size: - data.pool_size = traits[i].value; + if (traits[i].value == omp_atv_default) + data.pool_size = ~(uintptr_t) 0; + else + data.pool_size = traits[i].value; break; case omp_atk_fallback: switch (traits[i].value) |