tools: use ppoll() where higher timeout resolution makes sense
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 23 Apr 2024 10:04:50 +0000 (12:04 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 24 Apr 2024 07:55:36 +0000 (09:55 +0200)
commitbb5a2bbf5d254830502c3ef40ea22c49f557782c
treedeb17689139ea7dd8eb6188b136f884200e34960
parent9df101d6d6bac5a9ef42692034f3c2cfe9f2f521
tools: use ppoll() where higher timeout resolution makes sense

We allow timeout units to be specified in microseconds but for poll() we
need to round them up to milliseconds. Switch to ppoll() to avoid losing
precision.

Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20240423100452.32958-3-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
tools/gpiomon.c
tools/gpionotify.c