[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / thread.barrier / arrive.pass.cpp
blob18cdc6d654ac2b373bd1e8b66e2c99f70de1fa3b
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>
19 #include "make_test_thread.h"
20 #include "test_macros.h"
22 int main(int, char**)
24 std::barrier<> b(2);
26 auto tok = b.arrive();
27 std::thread t = support::make_test_thread([&](){
28 (void)b.arrive();
29 });
30 b.wait(std::move(tok));
31 t.join();
33 auto tok2 = b.arrive(2);
34 b.wait(std::move(tok2));
35 return 0;