Ignore:
Timestamp:
Mar 24, 2020, 1:39:31 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c72ea7a, f100a83
Parents:
210b8b3
Message:

Threads in debug now keep track of last function to park/unpark it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/park/contention.cfa

    r210b8b3 rae66348  
    2121                if(blocked[idx]) {
    2222                        Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST);
    23                         unpark( *thrd );
     23                        unpark( *thrd __cfaabi_dbg_ctx2 );
    2424                } else {
    2525                        Thread * thrd = __atomic_exchange_n(&blocked[idx], &this, __ATOMIC_SEQ_CST);
    26                         unpark( *thrd);
    27                         park();
     26                        unpark( *thrd __cfaabi_dbg_ctx2 );
     27                        park( __cfaabi_dbg_ctx );
    2828                }
    2929        }
     
    4141                        int idx = myrand() % blocked_size;
    4242                        Thread * thrd = __atomic_exchange_n(&blocked[idx], 0p, __ATOMIC_SEQ_CST);
    43                         unpark( *thrd );
     43                        unpark( *thrd __cfaabi_dbg_ctx2 );
    4444                        yield( myrand() % 20 );
    4545                }
Note: See TracChangeset for help on using the changeset viewer.