[VPlan] Add and use debug location for VPScalarCastRecipe.
[llvm-project.git] / libcxx / test / std / thread / thread.latch / arrive_and_wait.pass.cpp
blob23cb2706beb5b5bcecfe4f14a82aedf48fc5bb6b
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03, c++11, c++14, c++17
12 // XFAIL: availability-synchronization_library-missing
14 // <latch>
16 #include <latch>
17 #include <thread>
19 #include "make_test_thread.h"
20 #include "test_macros.h"
22 int main(int, char**)
24 std::latch l(2);
26 std::thread t = support::make_test_thread([&](){
27 l.arrive_and_wait();
28 });
29 l.arrive_and_wait();
30 t.join();
32 return 0;