From: Daniel Church <dchurch@andplus.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, libc-alpha@sourceware.org,
Daniel Church <dchurch@andplus.com>
Subject: [PATCH v2 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns
Date: Sat, 24 Jan 2015 12:48:57 -0500 [thread overview]
Message-ID: <1422121737-3686-3-git-send-email-dchurch@andplus.com> (raw)
In-Reply-To: <1422121737-3686-1-git-send-email-dchurch@andplus.com>
POSIX.1-2001 specification of timer_getoverrun() supports constant
DELAYTIMER_MAX which prevents overflow and caps overrun count. Exposes
delaytimer_max value to userland via /proc/sys/kernel/delaytimer_max such
that GLIBC can support DELAYTIMER_MAX constant.
Signed-off-by: Daniel Church <dchurch@andplus.com>
---
kernel/sysctl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 137c7f6..b283808 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -63,6 +63,7 @@
#include <linux/binfmts.h>
#include <linux/sched/sysctl.h>
#include <linux/kexec.h>
+#include <linux/posix-timers.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
@@ -761,6 +762,13 @@ static struct ctl_table kern_table[] = {
},
#endif
{
+ .procname = "delaytimer_max",
+ .data = &delaytimer_max,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
+ {
.procname = "pid_max",
.data = &pid_max,
.maxlen = sizeof (int),
--
1.9.1
next prev parent reply other threads:[~2015-01-24 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[PATCH 0/2] posix-timers: Prevents overrun counter overflow, adds DELAYTIMER_MAX>
2015-01-24 17:48 ` [PATCH v2 0/2] posix-timers: Prevents overrun counter overflow, adds DELAYTIMER_MAX Daniel Church
2015-01-24 17:48 ` [PATCH v2 1/2] posix-timers: Prevents overrun counter overflow Daniel Church
2015-01-24 18:17 ` Richard Cochran
2015-01-24 19:14 ` Thomas Gleixner
2015-01-24 19:37 ` Carlos O'Donell
2015-01-24 17:48 ` Daniel Church [this message]
2015-01-24 19:20 ` [PATCH v2 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns Thomas Gleixner
2015-01-24 19:36 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422121737-3686-3-git-send-email-dchurch@andplus.com \
--to=dchurch@andplus.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®