brintos

brintos / llvm-project-archived public Read only

0
0
Text · 686 B · dede7f4 Raw
30 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-threads10 11// <mutex>12 13// class recursive_timed_mutex;14 15// recursive_timed_mutex();16 17#include <mutex>18#include <cassert>19 20int main(int, char**) {21  // The mutex is unlocked after default construction22  {23    std::recursive_timed_mutex m;24    assert(m.try_lock());25    m.unlock();26  }27 28  return 0;29}30