Lines Matching defs:COND
31 with any other library that supports threads, locks, cond vars, etc.
78 static int COND = 0;
123 // 1. COND = 0
127 // c. COND = 1
129 // 4. while(COND) / e. MU.Unlock()
140 COND = 1;
148 COND = 0;
151 while(COND != 1)
172 // 1. COND = 0
176 // c. COND = 1
178 // 3. MU.LockWhen(COND==1) <---/
188 COND = 1; // We are done! Tell the Waiter.
194 COND = 0;
196 MU.LockWhen(Condition(&ArgIsOne, &COND)); // calls ANNOTATE_CONDVAR_WAIT
253 // 1. COND = 0
257 // c. COND = 1
259 // 4. while(COND) e. MU.Unlock()
268 COND = 1;
276 while(COND != 1)
283 COND = 0;
301 // 1. COND = 0
305 // c. COND = 1
307 // 4. while(COND) / e. MU.Unlock()
318 COND = 1;
326 COND = 0;
330 while(COND != 1)
349 bool COND = 0;
351 // LockWhen() is observed after COND has been set (due to sleep).
355 // 1. COND = 0
359 // c. COND = 1
361 // 3. MU.LockWhen(COND==1) <---/
369 COND = true; // We are done! Tell the Waiter.
373 COND = false;
378 MU.LockWhen(Condition(&ArgIsTrue, &COND)); // calls ANNOTATE_CONDVAR_WAIT
545 // 5. COND = 1 .
548 // \----> d. MU.LockWhen(COND == 1)
559 COND = 1;
569 MU.LockWhen(Condition(&ArgIsOne, &COND));
577 COND = 0;
635 // 3. COND = 1
636 // 4. ANNOTATE_CONDVAR_SIGNAL ------------> a. MU.LockWhen(COND == 1)
647 COND = 1;
653 MU.LockWhen(Condition(&ArgIsOne, &COND));
660 COND = 0;
678 // 5. COND-- e. COND--
680 // 7. MU2.Await(COND == 0) <------------+------ f. ANNOTATE_CONDVAR_SIGNAL(MU2)
681 // 8. MU2.Unlock() V-----> g. MU2.Await(COND == 0)
702 COND--;
704 MU2.Await(Condition(&ArgIsZero, &COND));
712 COND = 2;
736 COND--;
738 MU2.Await(Condition(&ArgIsZero, &COND));
745 COND = 3;
767 COND = 1; // We are done! Tell the Waiter.
773 COND = 0;
777 MU.Await(Condition(&ArgIsOne, &COND)); // calls ANNOTATE_CONDVAR_WAIT
800 COND = 1; // We are done! Tell the Waiter.
806 COND = 0;
810 CHECK(MU.AwaitWithTimeout(Condition(&ArgIsOne, &COND), INT_MAX));
834 CHECK(!MU.AwaitWithTimeout(Condition(&ArgIsOne, &COND), 100));
841 COND = 0;
861 CHECK(!MU.LockWhenWithTimeout(Condition(&ArgIsOne, &COND), 100));
868 COND = 0;
891 while(COND != 1 && ms_left_to_wait > 0) {
901 COND = 0;
985 COND = 1; // We are done! Tell the Waiter.
991 COND = 0;
993 MU.ReaderLockWhen(Condition(&ArgIsOne, &COND));
1018 COND = 1; // We are done! Tell the Waiter.
1024 COND = 0;
1026 CHECK(MU.ReaderLockWhenWithTimeout(Condition(&ArgIsOne, &COND), INT_MAX));
1050 CHECK(!MU.ReaderLockWhenWithTimeout(Condition(&ArgIsOne, &COND), 100));
1057 COND = 0;
1785 // test42: TN. Using the same cond var several times. {{{1
1788 int COND = 0;
1796 COND = 1;
1801 while (COND != 0)
1813 while (COND != 1)
1821 COND = 0;
2118 // 1. COND = 0
2122 // c. COND = 1
2124 // 4. while(COND != 1) / e. MU.Unlock()
2138 COND = 1;
2150 while(COND != 1)
2159 COND = 0;
2173 int COND = 0;
2183 // 3. while(COND)
2188 // \ c. COND = 1
2195 // h. COND = 1
2205 COND = 1;
2214 COND = 1;
2222 while(COND != 1)
2244 int COND = 0;
2255 // c. COND = 1
2260 // 3. while(COND)
2265 // \ h. COND = 1
2274 COND = 1;
2284 COND = 1;
2294 while(COND != 1)
2962 int COND = 0;
2975 COND++;
2986 if (COND == N_writers)
3013 int COND = 0;
3027 COND++;
3040 if (COND == N_writers)
4442 int COND = 0;
4455 COND = 1;
4474 while(COND != 1)
4501 int COND = 0;
4513 COND = 1;
4527 while(COND != 1)
4997 bool COND = false;
5009 mu.LockWhen(Condition(&ArgIsTrue, &COND));
5031 COND = true;
6122 int COND = 0;
6130 COND = 1;
6137 while (COND == 0)