If we pass "-1" to arg2, PR_SET_TIMERSLACK will set ULONG_MAX to timer slack_ns instead of using default value. Also, after kernel commit da8b44d5a9f8 ("timer: convert timer_slack_ns from unsigned long to u64"), timer_slack_ns and default timer_slack_ns have been converted into u64, the return value of PR_GET_TIMERSLACK has been limited under ULONG_MAX. Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxxxxx> --- man2/prctl.2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man2/prctl.2 b/man2/prctl.2 index 52fd0f3f3..de6a34c68 100644 --- a/man2/prctl.2 +++ b/man2/prctl.2 @@ -1239,12 +1239,15 @@ this operation expects a user-space buffer of 8 (not 4) bytes on these ABIs. Each thread has two associated timer slack values: a "default" value, and a "current" value. This operation sets the "current" timer slack value for the calling thread. +.IR arg2 +is an unsigned long value. If the nanosecond value supplied in .IR arg2 is greater than zero, then the "current" value is set to this value. +The maximum "current" value is ULONG_MAX. If .I arg2 -is less than or equal to zero, +is equal to zero, .\" It seems that it's not possible to set the timer slack to zero; .\" The minimum value is 1? Seems a little strange. the "current" timer slack is reset to the @@ -1303,6 +1306,7 @@ See .BR PR_GET_TIMERSLACK " (since Linux 2.6.28)" Return (as the function result) the "current" timer slack value of the calling thread. +The maximum value is ULONG_MAX. .TP .BR PR_SET_TIMING " (since Linux 2.6.0)" .\" Precisely: Linux 2.6.0-test4 -- 2.18.1