• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // UNSUPPORTED: libcpp-has-no-threads, libcpp-has-thread-api-external
11 
12 // XFAIL: windows
13 
14 // <mutex>
15 
16 // class mutex;
17 
18 // typedef pthread_mutex_t* native_handle_type;
19 // native_handle_type native_handle();
20 
21 #include <mutex>
22 #include <cassert>
23 
main()24 int main()
25 {
26     std::mutex m;
27     pthread_mutex_t* h = m.native_handle();
28     assert(h);
29 }
30