brintos

brintos / llvm-project-archived public Read only

0
0
Text · 747 B · 3de6635 Raw
33 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8//9// UNSUPPORTED: no-threads, libcpp-has-thread-api-external10 11// XFAIL: windows12 13// <mutex>14 15// class mutex;16 17// typedef pthread_mutex_t* native_handle_type;18// native_handle_type native_handle();19 20#include <mutex>21#include <cassert>22 23#include "test_macros.h"24 25int main(int, char**)26{27    std::mutex m;28    pthread_mutex_t* h = m.native_handle();29    assert(h);30 31  return 0;32}33