Changes in tests/unified_locking/locks.cfa [22b7579:84f49be]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/unified_locking/locks.cfa
r22b7579 r84f49be 15 15 condition_variable( owner_lock ) c_o; 16 16 17 fast_lock f;18 condition_variable( fast_lock ) c_f;19 20 17 thread T_C_M_WS1 {}; 21 18 … … 71 68 } 72 69 unlock(s); 73 }74 }75 76 thread T_C_F_WS1 {};77 78 void main( T_C_F_WS1 & this ) {79 for (unsigned int i = 0; i < num_times; i++) {80 lock(f);81 if(empty(c_f) && i != num_times - 1) {82 wait(c_f,f);83 }else{84 notify_one(c_f);85 }86 unlock(f);87 }88 }89 90 thread T_C_F_WB1 {};91 92 void main( T_C_F_WB1 & this ) {93 for (unsigned int i = 0; i < num_times; i++) {94 lock(f);95 if(counter(c_f) == 3 || i == num_times - 1) {96 notify_all(c_f);97 }else{98 wait(c_f,f);99 }100 unlock(f);101 70 } 102 71 } … … 286 255 printf("Done Test 6\n"); 287 256 288 printf("Start Test 7: fast lock and condition variable singlewait/notify\n");289 { 290 T_C_ F_WS1t1[2];257 printf("Start Test 7: multi acquisiton lock and condition variable multiple acquire and wait/notify\n"); 258 { 259 T_C_M_WS2 t1[2]; 291 260 } 292 261 printf("Done Test 7\n"); 293 262 294 printf("Start Test 8: fast lock and condition variable 3 wait/notify all\n");295 { 296 T_C_ F_WB1 t1[4];263 printf("Start Test 8: owner lock and condition variable multiple acquire and wait/notify\n"); 264 { 265 T_C_O_WS2 t1[2]; 297 266 } 298 267 printf("Done Test 8\n"); 299 268 300 printf("Start Test 9: multi acquisiton lock and condition variable multiple acquire and wait/notify\n"); 301 { 302 T_C_M_WS2 t1[2]; 303 } 304 printf("Done Test 9\n"); 305 306 printf("Start Test 10: owner lock and condition variable multiple acquire and wait/notify\n"); 307 { 308 T_C_O_WS2 t1[2]; 309 } 310 printf("Done Test 10\n"); 311 312 printf("Start Test 11: no lock condition variable wait/notify\n"); 269 printf("Start Test 9: no lock condition variable wait/notify\n"); 313 270 { 314 271 T_C_NLW t1; 315 272 T_C_NLS t2; 316 273 } 317 printf("Done Test 11\n");318 319 printf("Start Test 1 2: locked condition variable wait/notify with front()\n");274 printf("Done Test 9\n"); 275 276 printf("Start Test 10: locked condition variable wait/notify with front()\n"); 320 277 { 321 278 T_C_S_WNF t1[2]; 322 279 } 323 printf("Done Test 1 2\n");280 printf("Done Test 10\n"); 324 281 325 282 // removed to limit test duration. Full test is in long run tests
Note: See TracChangeset
for help on using the changeset viewer.