Uh sorry, it looks like my formatting got mangled.. here it is again:
----------------------------------------------------------
Test 14a
Initially: a=b=y=0
Thread 1
r1 =1
if (r1 == 0)
y =1
else
b =1
Thread 2
r2=y
r3=b
if (r2+r3 !=0)
a=1
Question: r1=r3=1, r2=0?
-----------------------------------------------------------
Vijay Saraswat wrote:
> I wonder whether this test case has been discussed before. If so,
> please point me to the discussion. If not, how should this be dealt with?
> -----------------------------------------------------------
> Test 14a
> Initially: a=b=y=0
>
> Thread 1 Thread 2
> r1=a if (r1==0) r2=y
> y=1 r3=b
> else if (r2+r3 != 0)
> b=1 a=1
>
> Question: r1=r3=1, r2=0?
> -----------------------------------------------------------
>
> The case is obtained from Test 14, without making the volatility
> assumption.
>
> Best,
> Vijay
>
> -------------------------------
> JavaMemoryModel mailing list -
> http://www.cs.umd.edu/~pugh/java/memoryModel
>
>
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:59 EDT