Page 1 of 1

data race in flush_nolist.1.c?

PostPosted: Mon Jan 28, 2019 2:50 pm
by sfsiegel
In flush_nolist.1c, isn't there a data race in function f1 on “*q=1” ?
This can be executed by all threads concurrently, and in all threads, q points to the shared variable j.
Also, a thread could be executing "sum += j" in function g while another thread is executing "*q=1" --- isn't that also a possible read-write data race?