[libc-commits] [libc] [libc] rework mutex (PR #92168)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Sat May 25 10:22:15 PDT 2024


================
@@ -27,7 +29,7 @@ int CndVar::wait(Mutex *m) {
 
   CndWaiter waiter;
   {
-    MutexLock ml(&qmtx);
+    cpp::lock_guard ml(qmtx);
----------------
SchrodingerZhu wrote:

I think so, hh. `cpp::lock_guard` is more generic. Guess we can remove `MutexLock` later on, since they serve the same functionality and `MutexLock` is type specific.

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


More information about the libc-commits mailing list