Changeset 8f1a99e for tests/concurrent


Ignore:
Timestamp:
Jul 5, 2021, 4:58:07 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b7d94ac5
Parents:
7f62b708
Message:

Step 3 Fixed tests

Location:
tests/concurrent
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/semaphore.cfa

    r7f62b708 r8f1a99e  
    2222
    2323void main(Blocker & this) {
    24         $thread * me = active_thread();
     24        thread$ * me = active_thread();
    2525        this.sum = 0;
    2626        for(num_blocks) {
     
    4545                or else {}
    4646
    47                 $thread * t = V(ben, false);
     47                thread$ * t = V(ben, false);
    4848                if(t) {
    4949                        this.sum += (unsigned)t;
  • tests/concurrent/signal/block.cfa

    r7f62b708 r8f1a99e  
    3333
    3434monitor global_data_t {
    35         $thread * last_thread;
    36         $thread * last_signaller;
     35        thread$ * last_thread;
     36        thread$ * last_signaller;
    3737};
    3838
     
    8282        if( !is_empty( cond ) ) {
    8383
    84                 $thread * next = ( $thread * ) front( cond );
     84                thread$ * next = ( thread$ * ) front( cond );
    8585
    8686                if( ! signal_block( cond ) ) {
  • tests/concurrent/spinaphore.cfa

    r7f62b708 r8f1a99e  
    2121void main(Blocker & this);
    2222
    23 Blocker * from_thread($thread * t) {
     23Blocker * from_thread(thread$ * t) {
    2424        Blocker & nullb = *(Blocker*)0p;
    25         $thread & nullt = (thread&)nullb;
     25        thread$ & nullt = (thread&)nullb;
    2626        uintptr_t offset  = (uintptr_t)&nullt;
    2727        uintptr_t address = ((uintptr_t)t) - offset;
     
    3030
    3131void main(Blocker & this) {
    32         $thread * me = active_thread();
     32        thread$ * me = active_thread();
    3333        Blocker * me1 = &this;
    3434        Blocker * me2 = from_thread(me);
     
    5151        unsigned me = (unsigned)(uintptr_t)&this;
    5252        for(num_unblocks) {
    53                 $thread * t = V(sem, false);
     53                thread$ * t = V(sem, false);
    5454                Blocker * b = from_thread(t);
    5555                b->sum += me;
Note: See TracChangeset for help on using the changeset viewer.