]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/posix-timerfd: Output correct old_value on set
authorAndrei Tatar <andrei@unikraft.io>
Wed, 22 Jan 2025 22:16:37 +0000 (23:16 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Tue, 25 Feb 2025 08:02:29 +0000 (08:02 +0000)
commita81f9ec3c91971109b2bc498ccc2fb80c9e5d4f2
treeff0b6e42956bcf4abf858d9a2deeb1c4a44d4bca
parent8844fba3fdafa823590b56af583a2d558bcdcd24
lib/posix-timerfd: Output correct old_value on set

Previously settime() would output the old timerfd setting verbatim, as
an absolute deadline; this contradicts timerfd_settime(2) which clearly
states that old_value should be output with the same semantics as
gettime() -- relative time remaining until the next expiration.
This change makes settime() calculate and output this time correctly.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1568
lib/posix-timerfd/timerfd.c