diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 0e0765cb66e..cd59b5ed378 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,19 @@ 2021-10-01 Tobias Burnus + Backported from master: + 2021-10-01 Jakub Jelinek + + * affinity-fmt.c (omp_get_team_num, omp_get_num_teams): Add + ialias_redirect. + * env.c (handle_omp_display_env): Use ialias_call. + * icv-device.c: Move ialias right below each function. + (omp_get_device_num): Use ialias_call. + * fortran.c (omp_fulfill_event): Add ialias_redirect. + * icv.c (omp_get_active_level): Add ialias_redirect. + +2021-10-01 Tobias Burnus + + Backported from master: 2021-10-01 Jakub Jelinek * omp.h.in (omp_aligned_alloc, omp_aligned_calloc): Add diff --git a/libgomp/affinity-fmt.c b/libgomp/affinity-fmt.c index 9f40e37f9a1..75940b554a7 100644 --- a/libgomp/affinity-fmt.c +++ b/libgomp/affinity-fmt.c @@ -37,6 +37,9 @@ #include #endif +ialias_redirect (omp_get_team_num) +ialias_redirect (omp_get_num_teams) + bool gomp_print_string (const char *str, size_t len) { diff --git a/libgomp/env.c b/libgomp/env.c index 9216998f6f7..69ce1d24ee0 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -1416,7 +1416,7 @@ handle_omp_display_env (void) gomp_error ("Invalid value for environment variable OMP_DISPLAY_ENV"); if (display) - omp_display_env (verbose); + ialias_call (omp_display_env) (verbose); } diff --git a/libgomp/fortran.c b/libgomp/fortran.c index 07f97656e51..d171c7992eb 100644 --- a/libgomp/fortran.c +++ b/libgomp/fortran.c @@ -96,6 +96,7 @@ ialias_redirect (omp_destroy_allocator) ialias_redirect (omp_set_default_allocator) ialias_redirect (omp_get_default_allocator) ialias_redirect (omp_display_env) +ialias_redirect (omp_fulfill_event) #endif #ifndef LIBGOMP_GNU_SYMBOL_VERSIONING diff --git a/libgomp/icv-device.c b/libgomp/icv-device.c index f11bdfa85c4..709ceeb7b01 100644 --- a/libgomp/icv-device.c +++ b/libgomp/icv-device.c @@ -35,6 +35,8 @@ omp_set_default_device (int device_num) icv->default_device_var = device_num >= 0 ? device_num : 0; } +ialias (omp_set_default_device) + int omp_get_default_device (void) { @@ -42,18 +44,24 @@ omp_get_default_device (void) return icv->default_device_var; } +ialias (omp_get_default_device) + int omp_get_initial_device (void) { return gomp_get_num_devices (); } +ialias (omp_get_initial_device) + int omp_get_num_devices (void) { return gomp_get_num_devices (); } +ialias (omp_get_num_devices) + int omp_is_initial_device (void) { @@ -61,17 +69,14 @@ omp_is_initial_device (void) return 1; } +ialias (omp_is_initial_device) + int omp_get_device_num (void) { /* By specification, this is equivalent to omp_get_initial_device on the host. */ - return omp_get_initial_device (); + return ialias_call (omp_get_initial_device) (); } -ialias (omp_set_default_device) -ialias (omp_get_default_device) -ialias (omp_get_initial_device) -ialias (omp_get_num_devices) -ialias (omp_is_initial_device) ialias (omp_get_device_num) diff --git a/libgomp/icv.c b/libgomp/icv.c index e32e5b2fdb0..4b4892fb35e 100644 --- a/libgomp/icv.c +++ b/libgomp/icv.c @@ -30,6 +30,8 @@ #include "gomp-constants.h" #include +ialias_redirect (omp_get_active_level) + void omp_set_num_threads (int n) {