aboutsummaryrefslogtreecommitdiff
path: root/libgomp/fortran.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2021-07-27 21:08:41 +0200
committerUlrich Drepper <drepper@gmail.com>2021-07-27 21:08:41 +0200
commit7123ae2455b5a1a2f19f13fa82c377cfda157f23 (patch)
tree34c38adcc3e4f5af739a6d72b34186c3b9c78991 /libgomp/fortran.c
parent0853f392a213ef2cecc71ef5349aab079e30f5a0 (diff)
downloadgcc-7123ae2455b5a1a2f19f13fa82c377cfda157f23.zip
gcc-7123ae2455b5a1a2f19f13fa82c377cfda157f23.tar.gz
gcc-7123ae2455b5a1a2f19f13fa82c377cfda157f23.tar.bz2
Implement OpenMP 5.1 section 3.15: omp_display_env
This is a new interface which is easily implemented using the already existing code for the handling of the OMP_DISPLAY_ENV environment variable. libgomp/ * env.c (wait_policy, stacksize): New static variables, move out of handle_omp_display_env. (omp_display_env): New function. The meat of the old handle_omp_display_env function. (handle_omp_display_env): Change to not take parameters and instead use the global variables. Only perform parsing, defer to omp_display_env for the implementation. (initialize_env): Remove local variables wait_policy and stacksize. Don't pass parameters to handle_omp_display_env. * fortran.c: Add ialias_redirect for omp_display_env. (omp_display_env_, omp_display_env_8_): New functions. * libgomp.map (OMP_5.1): New version. Add omp_display_env, omp_display_env_, and omp_display_env_8_. * omp.h.in: Declare omp_display_env. * omp_lib.f90.in: Likewise. * omp_lib.h.in: Likewise.
Diffstat (limited to 'libgomp/fortran.c')
-rw-r--r--libgomp/fortran.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libgomp/fortran.c b/libgomp/fortran.c
index 4ec39c4..76285d4 100644
--- a/libgomp/fortran.c
+++ b/libgomp/fortran.c
@@ -94,6 +94,7 @@ ialias_redirect (omp_init_allocator)
ialias_redirect (omp_destroy_allocator)
ialias_redirect (omp_set_default_allocator)
ialias_redirect (omp_get_default_allocator)
+ialias_redirect (omp_display_env)
#endif
#ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
@@ -736,3 +737,15 @@ omp_get_default_allocator_ ()
{
return (intptr_t) omp_get_default_allocator ();
}
+
+void
+omp_display_env_ (const int32_t *verbose)
+{
+ omp_display_env (*verbose);
+}
+
+void
+omp_display_env_8_ (const int64_t *verbose)
+{
+ omp_display_env (!!*verbose);
+}