libgpiod - stop waiting for events after request released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I am writing a C# binding for libgpiodv2. There are some automated
tests that keep failing due to the fact that each test uses the event
handling functionality of libgpiodv2. First it creates a request, then
starts a thread to handle edge events, does some operations on line/s
which causes edge events to be created, and in the end releases the
request. When the next test starts, it get's an "Error: Device or
resource busy"
I checked the freeing logic and could find out that the reason lies
within the event handler thread that is still waiting on
gpiod_line_request_wait_edge_events that returns only when the timeout
appears. My expectation was that when the request gets released,
gpiod_line_request_wait_edge_events  would immediately return without
timing out, but that is not the case.

So my question is, is that by design?
If yes, and there is no interest in changing it, I would find ways
around it, like waiting on the timeout but that would force me to set
it very low, to not delay the tests too much.

Regards,
Mathias




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux