about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-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;
 	    }