about summary refs log tree commit diff
path: root/Src/Builtins
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-13 13:45:14 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-13 13:45:14 +0000
commitf67feb4054fac10ecdcd5b858841f1e2b1c5147b (patch)
treed17e238cd1301cc37a9d6ae3380fef96ea871e78 /Src/Builtins
parentace2616432ae930d29966bbb29a827a57e198dc3 (diff)
downloadzsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.tar.gz
zsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.tar.xz
zsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.zip
zsh-workers/8229
Diffstat (limited to 'Src/Builtins')
-rw-r--r--Src/Builtins/rlimits.awk4
-rw-r--r--Src/Builtins/rlimits.c17
2 files changed, 20 insertions, 1 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk
index e2500582a..39ad8b288 100644
--- a/Src/Builtins/rlimits.awk
+++ b/Src/Builtins/rlimits.awk
@@ -6,7 +6,7 @@
 #
 BEGIN {limidx = 0}
 
-/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z]*,[\t ]*)/ {
+/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z]*,[\t ]*)/ {
     limindex = index($0, "RLIMIT_")
     limtail = substr($0, limindex, 80)
     split(limtail, tmp)
@@ -35,6 +35,8 @@ BEGIN {limidx = 0}
 	    if (limnam == "NPROC")   { msg[limnum] = "maxproc" }
 	    if (limnam == "AS")      { msg[limnum] = "addressspace" }
 	    if (limnam == "TCACHE")  { msg[limnum] = "cachedthreads" }
+	    if (limnam == "AIO_OPS") { msg[limnum] = "aiooperations" }
+	    if (limnam == "AIO_MEM") { msg[limnum] = "aiomemorylocked" }
         }
     }
 }
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c
index 505b024e4..8ffcf5cdf 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -218,6 +218,20 @@ printulimit(int lim, int hard, int head)
 	    printf("cached threads             ");
 	break;
 # endif /* RLIMIT_TCACHE */
+# ifdef RLIMIT_AIO_OPS
+    case RLIMIT_AIO_OPS:
+	if (head)
+	    printf("AIO operations             ");
+	break;
+# endif /* RLIMIT_AIO_OPS */
+# ifdef RLIMIT_AIO_MEM
+    case RLIMIT_AIO_MEM:
+	if (head)
+	    printf("AIO locked-in-memory (kb)  ");
+	if (limit != RLIM_INFINITY)
+	    limit /= 1024;
+	break;
+# endif /* RLIMIT_AIO_MEM */
     }
     /* display the limit */
     if (limit == RLIM_INFINITY)
@@ -538,6 +552,9 @@ bin_ulimit(char *name, char **argv, char *ops, int func)
 # ifdef RLIMIT_VMEM
 	    case RLIMIT_VMEM:
 # endif /* RLIMIT_VMEM */
+# ifdef RLIMIT_AIO_MEM
+	    case RLIMIT_AIO_MEM:
+# endif /* RLIMIT_AIO_MEM */
 		limit *= 1024;
 		break;
 	    }