Lines Matching defs:L2
12 // template <class L1, class L2, class... L3>
13 // int try_lock(L1&, L2&, L3&...);
54 class L2
59 L2() : locked_(false) {}
97 L2 l1;
110 L2 l0;
127 L0 l2;
128 assert(std::try_lock(l0, l1, l2) == -1);
131 assert(l2.locked());
136 L1 l2;
137 assert(std::try_lock(l0, l1, l2) == 0);
140 assert(!l2.locked());
143 L2 l0;
144 L2 l1;
145 L2 l2;
148 std::try_lock(l0, l1, l2);
155 assert(!l2.locked());
161 L2 l2;
162 assert(std::try_lock(l0, l1, l2) == 1);
165 assert(!l2.locked());
170 L1 l2;
171 assert(std::try_lock(l0, l1, l2) == 2);
174 assert(!l2.locked());
179 L0 l2;
180 assert(std::try_lock(l0, l1, l2) == 1);
183 assert(!l2.locked());
188 L0 l2;
189 assert(std::try_lock(l0, l1, l2) == 0);
192 assert(!l2.locked());
197 L2 l2;
200 std::try_lock(l0, l1, l2);
207 assert(!l2.locked());
212 L2 l1;
213 L0 l2;
216 std::try_lock(l0, l1, l2);
223 assert(!l2.locked());
227 L2 l0;
229 L0 l2;
232 std::try_lock(l0, l1, l2);
239 assert(!l2.locked());
245 L0 l2;
246 assert(std::try_lock(l0, l1, l2) == 0);
249 assert(!l2.locked());
254 L1 l2;
255 assert(std::try_lock(l0, l1, l2) == 0);
258 assert(!l2.locked());
263 L1 l2;
264 assert(std::try_lock(l0, l1, l2) == 1);
267 assert(!l2.locked());
272 L2 l2;
273 assert(std::try_lock(l0, l1, l2) == 0);
276 assert(!l2.locked());
280 L2 l1;
281 L1 l2;
282 assert(std::try_lock(l0, l1, l2) == 0);
285 assert(!l2.locked());
288 L2 l0;
290 L1 l2;
293 std::try_lock(l0, l1, l2);
300 assert(!l2.locked());
304 L2 l0;
305 L2 l1;
306 L0 l2;
309 std::try_lock(l0, l1, l2);
316 assert(!l2.locked());
320 L2 l0;
322 L2 l2;
325 std::try_lock(l0, l1, l2);
332 assert(!l2.locked());
337 L2 l1;
338 L2 l2;
341 std::try_lock(l0, l1, l2);
348 assert(!l2.locked());
352 L2 l0;
353 L2 l1;
354 L1 l2;
357 std::try_lock(l0, l1, l2);
364 assert(!l2.locked());
368 L2 l0;
370 L2 l2;
373 std::try_lock(l0, l1, l2);
380 assert(!l2.locked());
385 L2 l1;
386 L2 l2;
387 assert(std::try_lock(l0, l1, l2) == 0);
390 assert(!l2.locked());
394 L2 l1;
395 L1 l2;
398 std::try_lock(l0, l1, l2);
405 assert(!l2.locked());
411 L2 l2;
412 assert(std::try_lock(l0, l1, l2) == 0);
415 assert(!l2.locked());
419 L2 l1;
420 L0 l2;
421 assert(std::try_lock(l0, l1, l2) == 0);
424 assert(!l2.locked());
427 L2 l0;
429 L1 l2;
432 std::try_lock(l0, l1, l2);
439 assert(!l2.locked());
443 L2 l0;
445 L0 l2;
448 std::try_lock(l0, l1, l2);
455 assert(!l2.locked());
461 L0 l2;
463 assert(std::try_lock(l0, l1, l2, l3) == -1);
466 assert(l2.locked());
472 L0 l2;
474 assert(std::try_lock(l0, l1, l2, l3) == 0);
477 assert(!l2.locked());
483 L0 l2;
485 assert(std::try_lock(l0, l1, l2, l3) == 1);
488 assert(!l2.locked());
494 L1 l2;
496 assert(std::try_lock(l0, l1, l2, l3) == 2);
499 assert(!l2.locked());
505 L0 l2;
507 assert(std::try_lock(l0, l1, l2, l3) == 3);
510 assert(!l2.locked());