1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-07 11:41:16 +02:00

44710: support RLIMIT_UMTXP on FreeBSD

This commit is contained in:
Jun-ichi Takimoto 2019-08-28 10:02:29 +09:00
parent 3da3fe770a
commit b82c24801f
4 changed files with 16 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2019-08-28 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 44710: Src/Builtins/rlimits.awk, Src/Builtins/rlimits.c,
configure.ac: support RLIMIT_UMTXP on FreeBSD
* 44709: Src/zsh_system.h: incluce sys/capability.h only if
HAVE_CAP_GET_PROC is defined

View file

@ -59,6 +59,7 @@ BEGIN {limidx = 0}
if (limnam == "NPTS") { msg[limnum] = "Npseudoterminals" }
if (limnam == "SWAP") { msg[limnum] = "Mswapsize" }
if (limnam == "KQUEUES") { msg[limnum] = "Nkqueues" }
if (limnam == "UMTXP") { msg[limnum] = "Numtxp" }
}
}
}

View file

@ -413,6 +413,12 @@ printulimit(char *nam, int lim, int hard, int head)
printf("-k: kqueues ");
break;
# endif /* HAVE_RLIMIT_KQUEUES */
# ifdef HAVE_RLIMIT_UMTXP
case RLIMIT_UMTXP:
if (head)
printf("-o: umtx shared locks ");
break;
# endif /* HAVE_RLIMIT_UMTXP */
default:
if (head)
printf("-N %2d: ", lim);
@ -894,6 +900,11 @@ bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
case 'T':
res = RLIMIT_PTHREAD;
break;
# endif
# ifdef HAVE_RLIMIT_UMTXP
case 'o':
res = RLIMIT_UMTXP;
break;
# endif
default:
/* unrecognised limit */

View file

@ -1880,6 +1880,7 @@ zsh_LIMIT_PRESENT(RLIMIT_POSIXLOCKS)
zsh_LIMIT_PRESENT(RLIMIT_NPTS)
zsh_LIMIT_PRESENT(RLIMIT_SWAP)
zsh_LIMIT_PRESENT(RLIMIT_KQUEUES)
zsh_LIMIT_PRESENT(RLIMIT_UMTXP)
AH_TEMPLATE([RLIMIT_VMEM_IS_RSS],
[Define to 1 if RLIMIT_VMEM and RLIMIT_RSS both exist and are equal.])