This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns
- From: Daniel Church <dchurch at andplus dot com>
- To: Thomas Gleixner <tglx at linutronix dot de>
- Cc: linux-kernel at vger dot kernel dot org, libc-alpha at sourceware dot org, Daniel Church <dchurch at andplus dot com>
- Date: Sat, 24 Jan 2015 12:48:57 -0500
- Subject: [PATCH v2 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns
- Authentication-results: sourceware.org; auth=none
- References: <[PATCH 0/2] posix-timers: Prevents overrun counter overflow, adds DELAYTIMER_MAX> <1422121737-3686-1-git-send-email-dchurch at andplus dot 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