[LTP] [PATCH v2 2/2] pec: Improve reliability

Joerg Vehlow
2021-08-23T04:31:43Z

Hi Petr,

On 8/20/2021 1:01 PM, Petr Vorel wrote:
> Hi Joerg,
>
> I suppose this one is superseded by adding volatile by Martin's fix in
> b1e7776bf ("connectors/pec_listener: Make exit_flag volatile")
No, not at all.
The first issue is a timing issue between the event generator -> kernel
-> pec_listener,
that cannot be fixed by a volatile, only by correct synchronization.
The second issue is also unrelated.

Martin's fix is only for the rare case, where the exit_flag could be
optimized out by the compiler,
which would have made the event_listener run forever instead of terminating.

Joerg