diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-10-13 13:45:14 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-10-13 13:45:14 +0000 |
commit | f67feb4054fac10ecdcd5b858841f1e2b1c5147b (patch) | |
tree | d17e238cd1301cc37a9d6ae3380fef96ea871e78 | |
parent | ace2616432ae930d29966bbb29a827a57e198dc3 (diff) | |
download | zsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.tar.gz zsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.tar.xz zsh-f67feb4054fac10ecdcd5b858841f1e2b1c5147b.zip |
zsh-workers/8229
-rw-r--r-- | Doc/Zsh/builtins.yo | 2 | ||||
-rw-r--r-- | Src/Builtins/rlimits.awk | 4 | ||||
-rw-r--r-- | Src/Builtins/rlimits.c | 17 |
3 files changed, 22 insertions, 1 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index cfd86b660..6b0b8319e 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -523,6 +523,8 @@ sitem(tt(cputime))(Maximum CPU seconds per process.) sitem(tt(maxproc))(Maximum number of processes.) sitem(tt(addressspace))(Maximum amount of address space used.) sitem(tt(cachedthreads))(Maximum number of cached threads.) +sitem(tt(aiooperations))(Maximum number of AIO operations.) +sitem(tt(aiomemorylocked))(Maximum amount of memory locked in RAM for AIO operations.) endsitem() Which of these resource limits are available depends on the system. 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; } |