]> git.ipfire.org Git - thirdparty/qemu.git/commit
host-utils: Add muldiv64_round_up
authorNicholas Piggin <npiggin@gmail.com>
Tue, 8 Aug 2023 04:19:47 +0000 (14:19 +1000)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 25 Sep 2023 20:44:30 +0000 (23:44 +0300)
commit4bff0a82874366a32d5931e1a21d5a071ec3b931
tree938baadef0bf9d87d5ccd101d6ac04807c11ee9d
parentded5edee00b97521fb98c5407768995bd4873a4e
host-utils: Add muldiv64_round_up

This will be used for converting time intervals in different base units
to host units, for the purpose of scheduling timers to emulate target
timers. Timers typically must not fire before their requested expiry
time but may fire some time afterward, so rounding up is the right way
to implement these.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[ clg: renamed __muldiv64() to muldiv64_rounding() ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 47de6c4c287079744ceb96f606b3c0457addf380)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/qemu/host-utils.h