Ignore:
Timestamp:
May 20, 2022, 10:36:45 AM (4 years ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
25fa20a
Parents:
29d8c02 (diff), 7831e8fb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/unified_locking/locks.cfa

    r29d8c02 r74ec742  
    1818condition_variable( linear_backoff_then_block_lock ) c_l;
    1919
     20fast_block_lock f;
     21fast_cond_var( fast_block_lock ) f_c_f;
     22
    2023thread T_C_M_WS1 {};
    2124
     
    99102                }
    100103                unlock(l);
     104        }
     105}
     106
     107thread T_F_C_F_WS1 {};
     108
     109void main( T_F_C_F_WS1 & this ) {
     110        for (unsigned int i = 0; i < num_times; i++) {
     111                lock(f);
     112                if(empty(f_c_f) && i != num_times - 1) {
     113                        wait(f_c_f,f);
     114                }else{
     115                        notify_one(f_c_f);
     116                        unlock(f);
     117                }
    101118        }
    102119}
     
    322339        }
    323340        printf("Done Test 12\n");
    324 }
     341
     342        printf("Start Test 13: fast block lock and fast cond var single wait/notify\n");
     343        {
     344                T_F_C_F_WS1 t1[2];
     345        }
     346        printf("Done Test 13\n");
     347       
     348}
Note: See TracChangeset for help on using the changeset viewer.