Re: libgpiod - stop waiting for events after request released

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

 



Hi Erik!
Thanks for the clarification and pointing me to the aspect of thread awareness.
In the link to gpiod.h 2.1 you provided, it says: "Different,
standalone objects can safely be used concurrently. Most libgpiod
objects are standalone."
There exists a warning annotation about thread safety on these 2 methods
1. gpiod_info_event_get_line_info
2. gpiod_edge_event_buffer_get_event

 I try not to violate thread contracts, but in order to ensure that I
have to know which object can deal with concurrency and which not. You
mentioned the line_request being unsafe against multiple threads...
did you have to go through the code to find that out, or is this maybe
implicit knowledge?

Regarding the solution about my original problem: So I guess that
would replace the usage of gpiod_line_request_wait_edge_events
completely, right?
I would have to get the fd, poll and read events (interpret structure
and so on) from it and write exit signals to it? I am not a native C
dev, so that would be quite a task for me... I think I might just fix
threading access, to have only 1 thread access an object at a time,
and then live with using timeouts on test shutdown :)

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