Re:Why Const Doesn't Make C Code Faster
by H8crilA on Tuesday August 20, 2019 @01:01AM
(#20743971)
Yup, it's a data race (and therefore UB) to access the same memory from two different threads without synchronizing instructions (like mutexes, thread start/join, atomics).
It is allowed to concurrently read from const regions. But not concurrently read and write, and definitely not concurrently write.
It is allowed to concurrently read from const regions. But not concurrently read and write, and definitely not concurrently write.