[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / thread.barrier / arrive_and_drop.pass.cpp
blob3fc48261de1b129b348fb913c4b73d3db43c50dd
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
12 // XFAIL: availability-synchronization_library-missing
14 // <barrier>
16 #include <barrier>
17 #include <thread>
18 #include <cassert>
20 #include "make_test_thread.h"
21 #include "test_macros.h"
23 int main(int, char**)
25 std::barrier<> b(2);
27 std::thread t = support::make_test_thread([&](){
28 b.arrive_and_drop();
29 });
31 b.arrive_and_wait();
32 b.arrive_and_wait();
33 t.join();
34 return 0;