j
k
j a
j l
Anthony Williams wrote:
Suppose a1,a2 are initially zero Thread 1 then does: a2=1; //A ++a2; //B a1=3; //C r1=a1; //D Thread 2 does: a1=a2; //E
Suppose a1,a2 are initially zero
Thread 1 then does:
a2=1; //A ++a2; //B a1=3; //C
r1=a1; //D
Thread 2 does: a1=a2; //E
Yes, you are right. In fact, you can remove (B) from the example, it would still work.
Back to the thread
Back to the list