[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / thread.semaphore / acquire.pass.cpp
blob3f6e3107e8bce0c38407e48a1006e512b2472e73
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 // <semaphore>
16 #include <semaphore>
17 #include <thread>
19 #include "make_test_thread.h"
20 #include "test_macros.h"
22 int main(int, char**)
24 std::counting_semaphore<> s(2);
26 std::thread t = support::make_test_thread([&](){
27 s.acquire();
28 });
29 t.join();
31 s.acquire();
33 return 0;