Re: [PATCH rtems v2] once.c, onceimplh.h: Make synchronization variable volatile

2023-11-21 Thread Joel Sherrill
Thanks. I will pass this along and resubmit a patch to at least add a comment and fix formatting issues. Do we have a good place to add this information to the documentation? On Tue, Nov 21, 2023, 5:35 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 20.11.23 18:42, Joel

Re: [PATCH rtems v2] once.c, onceimplh.h: Make synchronization variable volatile

2023-11-21 Thread Sebastian Huber
On 20.11.23 18:42, Joel Sherrill wrote: The loop that waits for another thread to complete the once initialization was flagged as a potential infinite loop. This is because there was no way to break out of the loop inside the loop. The solution is to make the state variable volatile which

[PATCH rtems v2] once.c, onceimplh.h: Make synchronization variable volatile

2023-11-20 Thread Joel Sherrill
The loop that waits for another thread to complete the once initialization was flagged as a potential infinite loop. This is because there was no way to break out of the loop inside the loop. The solution is to make the state variable volatile which indicates it may be modified by another thread