aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-02-28 17:52:33 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-02-28 17:52:33 +0000
commit1bdbd705993eab79189dff87b69a9cff5c69b17e (patch)
tree93354adb0a612a635964c8498072087760a0f93b /usr.bin
parent3f3af790f95027d0c3b859a53eb82ef5d00dc4f8 (diff)
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
Notes
svn path=/head/; revision=296162
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 28b09ca0a622..093a367bad4c 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 5e7d12efc55f..5088c59767e9 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