Ignore:
Timestamp:
Oct 19, 2023, 3:26:27 PM (14 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
2d7cb19
Parents:
ca995e3
Message:

added fence to failing test to hopefully fix stale data issue on the arm, if this passes this fence will be put in waituntil code gen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/waituntil/channel_close.cfa

    rca995e3 rcbbfba9  
    2626        for( ;; ) {
    2727            if ( useAnd ) {
    28                 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    29                 and waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
     28                waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     29                and waituntil( (in2 << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in2 ); B_removes++; removes++; }
    3030                continue;
    3131            }
    32             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    33             or waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     32            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     33            or waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); ( B_removes == in ); B_removes++; removes++; }
    3434        }
    3535    } catchResume ( channel_closed * e ) {} // continue to remove until would block
     
    3737    try {
    3838        for( ;; )
    39             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
     39            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
    4040    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4141    catch ( channel_closed * e ) {}
    4242    try {
    4343        for( ;; )
    44             waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     44            waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in ); B_removes++; removes++; }
    4545    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4646    catch ( channel_closed * e ) {}
Note: See TracChangeset for help on using the changeset viewer.