diff options
Diffstat (limited to 'libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member')
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp deleted file mode 100644 index c8807a965c4..00000000000 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// UNSUPPORTED: libcpp-has-no-threads - -// <thread> - -// class thread - -// native_handle_type native_handle(); - -#include <thread> -#include <new> -#include <cstdlib> -#include <cassert> - -class G -{ - int alive_; -public: - static int n_alive; - static bool op_run; - - G() : alive_(1) {++n_alive;} - G(const G& g) : alive_(g.alive_) {++n_alive;} - ~G() {alive_ = 0; --n_alive;} - - void operator()() - { - assert(alive_ == 1); - assert(n_alive >= 1); - op_run = true; - } -}; - -int G::n_alive = 0; -bool G::op_run = false; - -int main() -{ - { - G g; - std::thread t0(g); - pthread_t pid = t0.native_handle(); - assert(pid != 0); - t0.join(); - } -} |