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/unified_locking
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tests/unified_locking/fast.cfa

    r7f62b708 r8f1a99e  
    77struct MutexObj {
    88        fast_lock l;
    9         $thread * id;
     9        thread$ * id;
    1010        uint32_t sum;
    1111};
     
    2121
    2222uint32_t cs() {
    23         $thread * me = active_thread();
     23        thread$ * me = active_thread();
    2424        uint32_t value;
    2525        lock(mo.l);
  • tests/unified_locking/mcs.cfa

    r7f62b708 r8f1a99e  
    77struct MutexObj {
    88        mcs_lock l;
    9         $thread * id;
     9        thread$ * id;
    1010        size_t sum;
    1111};
     
    2121
    2222unsigned cs() {
    23         $thread * me = active_thread();
     23        thread$ * me = active_thread();
    2424        unsigned value = (unsigned)me;
    2525        mcs_node n;
  • tests/unified_locking/thread_test.cfa

    r7f62b708 r8f1a99e  
    4040    for (unsigned int i = 0; i < num_times; i++) {
    4141        dowork(buffer, work_unlocked);
    42         lock(curr_lock);
     42        lock(*curr_lock);
    4343        //printf("lock: %d %p ENTER\n", i, &curr_lock);
    4444        //lock(norm_lock);
    4545        dowork(buffer, work_locked);
    4646        //printf("lock: %d %p LEAVE\n", i, &curr_lock);
    47         unlock(curr_lock);
     47        unlock(*curr_lock);
    4848        //unlock(norm_lock);
    4949        lck = rand() % lockCount;
     
    6565            break;
    6666        default:
    67             break; 
     67            break;
    6868    }
    6969        processor p[threadCount];
Note: See TracChangeset for help on using the changeset viewer.