[libc-commits] [libc] [libc] Replace `MutexLock` with `cpp::lock_guard` (PR #89340)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri Apr 19 09:44:45 PDT 2024


================
@@ -0,0 +1,67 @@
+//===-- Unittests for mutex -----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/CPP/mutex.h"
+#include "test/UnitTest/Test.h"
+
+using LIBC_NAMESPACE::cpp::adopt_lock;
+using LIBC_NAMESPACE::cpp::lock_guard;
+
+static const int SIGABRT = 6;
----------------
nickdesaulniers wrote:

And will need to add `libc.include.llvm-libc-macros.signal_macros` to the `DEPENDS` for this test.

https://github.com/llvm/llvm-project/pull/89340


More information about the libc-commits mailing list