From 1c952cf53c1bc956ed107562adf81255f1a68085 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 12 Jan 2015 13:47:01 +0100 Subject: [PATCH] futex.2: Note that the CLOCK_MONOTONIC clock is used for relative timeouts Verified from inspection of kernel/futex.c::futex_wait(). Signed-off-by: Michael Kerrisk --- man2/futex.2 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index 01637b58a..1af1c0057 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -140,8 +140,11 @@ time based on .BR CLOCK_REALTIME . If this option is not set, -the kernel treats the user space supplied timeout as relative time. -.\" FIXME a relative time based on what clock? +the kernel treats the user space supplied timeout as relative time, +.\" FIXME I added CLOCK_MONOTONIC here. Is it correct? +measured against the +.BR CLOCK_MONOTONIC +clock. .PP The operation specified in .I op @@ -159,7 +162,11 @@ on this futex address. If the .I timeout -argument is non-NULL, its contents specify a relative timeout for the wait. +argument is non-NULL, its contents specify a relative timeout for the wait +.\" FIXME I added CLOCK_MONOTONIC here. Is it correct? +measured according to the +.BR CLOCK_MONOTONIC +clock. (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount.)