Skip to content

tools: timeout handling improvements

Bartosz Golaszewski linux-gpio 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v24 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- only initialize the timespec containing the timeout value once before entering the for loop

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4tools: rename timeout to idle_timeout in gpiomon and gpionotifytools/gpiomon.c tools/gpionotify.c+8 -80 replies
2/4tools: use ppoll() where higher timeout resolution makes sensetools/gpiomon.c tools/gpionotify.c+20 -40 replies
3/4tools: allow longer time periodsconfigure.ac tools/gpioget.c tools/gpiomon.c +4 more+42 -230 replies
4/4tools: add minutes as a new supported time unittools/tools-common.c+6 -40 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchKent Gibson
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [libgpiod][PATCH v3 0/4] tools: timeout handling improvements

From: Bartosz Golaszewski <[email protected]>

Here's an assortment of improvements to parsing and handling of timeouts in gpio-tools.

I still decided to unify the period parsing between gpioset and gpioget even if it doesn't make much sense for gpioget to support periods longer than fractions of a second. Let users decide.

v2 -> v3:
- only initialize the timespec containing the timeout value once before entering the for loop

v1 -> v2:
- extend the series with renaming the timeout variable, using ppoll() instead of poll() and supporting minutes as time unit
- drop already applied patch

Bartosz Golaszewski (4):
tools: rename timeout to idle_timeout in gpiomon and gpionotify
tools: use ppoll() where higher timeout resolution makes sense
tools: allow longer time periods
tools: add minutes as a new supported time unit

 configure.ac         |  2 ++
 tools/gpioget.c      |  4 ++--
 tools/gpiomon.c      | 28 +++++++++++++++++++++-------
 tools/gpionotify.c   | 16 ++++++++++++----
 tools/gpioset.c      | 16 ++++++++--------
 tools/tools-common.c | 32 ++++++++++++++++++++++----------
 tools/tools-common.h |  5 +++--
 7 files changed, 70 insertions(+), 33 deletions(-)
Signature · 1 line
2.40.1