9e37e80a1d
This test uses bare variables to synchronize state between threads, but had forgotten volatile qualifiers on all the data. So the compiler was free to reorder and make assumptions that aren't valid when the values are being written from other CPUs. Single-cpu operation was fine because the code would always hit an external function call like k_sleep() that would force it to re-read from memory every time there was a context switch (timeslicing isn't enabled on this test and the threads are cooperative), but on SMP the volatiles can change at any time and we could see spurious state mixups and hangs. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
prod_consumer | ||
shared_mem | ||
index.rst |