Files
OpenCL-CTS/test_common/harness
Kévin Petit 0702f2ecee Make genrand_int32 thread safe (#1797)
The initialisation code is clearly meant to be run once but the volatile
flag did not guarantee that at all:

- Volatile does not mean atomic and loading the flag vs. other writes
  was not safe.
- Multiple threads could have loaded 0 and performed the initialisation
  resulting in write collisions.

Rely on std::call_once to provide the guarantee.

This issue was flagged by TSAN.

Signed-off-by: Kévin Petit <kpet@free.fr>
2023-08-19 11:15:17 +01:00
..
2020-05-20 14:16:19 +01:00
2021-09-13 13:25:32 +01:00
2022-08-30 09:47:15 -07:00
2020-10-30 14:13:52 +00:00
2020-10-30 14:13:52 +00:00