Changeset ec57856


Ignore:
Timestamp:
May 4, 2022, 3:28:33 PM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
6825167
Parents:
7f958c4
Message:

added fast lock tests

Location:
tests/unified_locking
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • tests/unified_locking/.expect/locks.txt

    r7f958c4 rec57856  
    2323Start Test 12: locked condition variable wait/notify with front()
    2424Done Test 12
     25Start Test 13: fast block lock and fast cond var single wait/notify
     26Done Test 13
  • tests/unified_locking/locks.cfa

    r7f958c4 rec57856  
    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.