Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: "Adrien Zinger" <zinger.ad@gmail.com>
To: "Erik Schilling" <erik.schilling@linaro.org>,
	<linux-gpio@vger.kernel.org>
Subject: Re: [libgpiod][PATCH] libgpiod: Allow to gracefully exit from a wait event
Date: Tue, 14 Nov 2023 11:09:56 +0100	[thread overview]
Message-ID: <CWYGBJ6SZ2UH.2S7NPDBHCGPIL@Kalray-lp232> (raw)
In-Reply-To: <CWXV8TMDNK59.WFY7K99MD7KQ@ablu-work>

> This sounds like an oddly specific API... I wonder, why does
> gpiod_line_request_get_fd [1] + doing the polling in your code
> not work
> for you? Since you already got a file descriptor for the
> notification that seems like little extra work. Or
> did you consider that but find
> it too verbose?

Until now it works like you said and it's not so verbose.

Actually I had the issue some weeks ago. And before digging inside the
library I have searched in the documentation and also asked on
stackoverflow [1] for a suggestion. Despite everything me and other
developers were not able to guess how to cancel a wait event from
another thread, without reading the code of the library. I thought
that it could be a good thing to provide that feature.

[1]
https://stackoverflow.com/questions/77222869/how-to-gracefully-cancel-gpiod-line-event-wait

Best regards,
Adrien


  reply	other threads:[~2023-11-14 10:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 14:32 [libgpiod][PATCH] libgpiod: Allow to gracefully exit from a wait event Adrien Zinger
2023-11-13 17:39 ` Erik Schilling
2023-11-14 10:09   ` Adrien Zinger [this message]
2023-11-15 17:10     ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CWYGBJ6SZ2UH.2S7NPDBHCGPIL@Kalray-lp232 \
    --to=zinger.ad@gmail.com \
    --cc=erik.schilling@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox