about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-23 14:29:14 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-11-29 09:30:00 -0300
commita4c3f5f46e850c977cda81c251036475aab8313c (patch)
tree6463279ee78a80d5aebeb1f351b2fb2d8c447b6a /scripts
parent9469261cf1924d350feeec64d2c80cafbbdcdd4d (diff)
downloadglibc-a4c3f5f46e850c977cda81c251036475aab8313c.tar.gz
glibc-a4c3f5f46e850c977cda81c251036475aab8313c.tar.xz
glibc-a4c3f5f46e850c977cda81c251036475aab8313c.zip
elf: Add a way to check if tunable is set (BZ 27069)
The patch adds two new macros, TUNABLE_GET_DEFAULT and TUNABLE_IS_INITIALIZED,
here the former get the default value with a signature similar to
TUNABLE_GET, while the later returns whether the tunable was set by
the environment variable.

Checked on x86_64-linux-gnu.
Reviewed-by: DJ Delorie <dj@redhat.com>
Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen-tunables.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen-tunables.awk b/scripts/gen-tunables.awk
index 1e9d6b534e..9f5336381e 100644
--- a/scripts/gen-tunables.awk
+++ b/scripts/gen-tunables.awk
@@ -163,8 +163,8 @@ END {
     n = indices[2];
     m = indices[3];
     printf ("  {TUNABLE_NAME_S(%s, %s, %s)", t, n, m)
-    printf (", {TUNABLE_TYPE_%s, %s, %s}, {%s}, false, %s},\n",
-	    types[t,n,m], minvals[t,n,m], maxvals[t,n,m],
+    printf (", {TUNABLE_TYPE_%s, %s, %s}, {%s}, {%s}, false, %s},\n",
+	    types[t,n,m], minvals[t,n,m], maxvals[t,n,m], default_val[t,n,m],
 	    default_val[t,n,m], env_alias[t,n,m]);
   }
   print "};"