summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-02-28 17:52:33 +0000
committerkib <kib@FreeBSD.org>2016-02-28 17:52:33 +0000
commite76eb4255b957aa73f6228dd8d525d1946e3707d (patch)
tree93354adb0a612a635964c8498072087760a0f93b /usr.bin
parent800b1f3198ded0c65c024ea0cef1f44d4bc59fed (diff)
downloadFreeBSD-src-e76eb4255b957aa73f6228dd8d525d1946e3707d.zip
FreeBSD-src-e76eb4255b957aa73f6228dd8d525d1946e3707d.tar.gz
Implement process-shared locks support for libthr.so.3, without
breaking the ABI. Special value is stored in the lock pointer to indicate shared lock, and offline page in the shared memory is allocated to store the actual lock. Reviewed by: vangyzen (previous version) Discussed with: deischen, emaste, jhb, rwatson, Martin Simmons <martin@lispworks.com> Tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/limits/limits.c7
-rw-r--r--usr.bin/procstat/procstat_rlimit.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c
index 28b09ca..093a367 100644
--- a/usr.bin/limits/limits.c
+++ b/usr.bin/limits/limits.c
@@ -92,6 +92,7 @@ static struct {
{ " pseudo-terminals%-4s %8s", "\n", 1 },
{ " swapuse%-4s %8s", " kB\n", 1024 },
{ " kqueues%-4s %8s", "\n", 1 },
+ { " umtxp%-4s %8s", "\n", 1 },
}
},
{ "sh", "unlimited", "", " -H", " -S", "",
@@ -110,6 +111,7 @@ static struct {
{ "ulimit%s -p %s", ";\n", 1 },
{ "ulimit%s -w %s", ";\n", 1024 },
{ "ulimit%s -k %s", ";\n", 1 },
+ { "ulimit%s -o %s", ";\n", 1 },
}
},
{ "csh", "unlimited", "", " -h", "", NULL,
@@ -128,6 +130,7 @@ static struct {
{ "limit%s pseudoterminals %s", ";\n", 1 },
{ "limit%s swapsize %s", ";\n", 1024 },
{ "limit%s kqueues %s", ";\n", 1 },
+ { "limit%s umtxp %s", ";\n", 1 },
}
},
{ "bash|bash2", "unlimited", "", " -H", " -S", "",
@@ -163,6 +166,7 @@ static struct {
{ "limit%s pseudoterminals %s", ";\n", 1 },
{ "limit%s swapsize %s", ";\n", 1024 },
{ "limit%s kqueues %s", ";\n", 1 },
+ { "limit%s umtxp %s", ";\n", 1 },
}
},
{ "ksh|pdksh", "unlimited", "", " -H", " -S", "",
@@ -239,6 +243,7 @@ static struct {
{ "pseudoterminals",login_getcapnum },
{ "swapuse", login_getcapsize },
{ "kqueues", login_getcapnum },
+ { "umtxp", login_getcapnum },
};
/*
@@ -289,7 +294,7 @@ main(int argc, char *argv[])
pid = -1;
optarg = NULL;
while ((ch = getopt(argc, argv,
- ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:")) != -1) {
+ ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:")) != -1) {
switch(ch) {
case 'a':
doall = 1;
diff --git a/usr.bin/procstat/procstat_rlimit.c b/usr.bin/procstat/procstat_rlimit.c
index 5e7d12e..5088c59 100644
--- a/usr.bin/procstat/procstat_rlimit.c
+++ b/usr.bin/procstat/procstat_rlimit.c
@@ -47,7 +47,7 @@
static struct {
const char *name;
const char *suffix;
-} rlimit_param[14] = {
+} rlimit_param[15] = {
{"cputime", "sec"},
{"filesize", "B "},
{"datasize", "B "},
@@ -62,9 +62,10 @@ static struct {
{"pseudo-terminals", " "},
{"swapuse", "B "},
{"kqueues", " "},
+ {"umtxp", " "},
};
-#if RLIM_NLIMITS > 14
+#if RLIM_NLIMITS > 15
#error "Resource limits have grown. Add new entries to rlimit_param[]."
#endif
OpenPOWER on IntegriCloud