[Lldb-commits] [lldb] Fix lock guads in PipePosix.cpp (PR #90572)
https://github.com/bulbazord commented: lgtm https://github.com/llvm/llvm-project/pull/90572 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix lock guads in PipePosix.cpp (PR #90572)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/90572 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix lock guads in PipePosix.cpp (PR #90572)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Danial Klimkin (dklimkin) Changes Guard object destroyed immediately after creation without naming. --- Full diff: https://github.com/llvm/llvm-project/pull/90572.diff 1 Files Affected: - (modified) lldb/source/Host/posix/PipePosix.cpp (+2-2) ``diff diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index afd3fe39059ac1..f35c348990df62 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -108,7 +108,7 @@ Status PipePosix::CreateNew(bool child_processes_inherit) { } Status PipePosix::CreateNew(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened"); @@ -146,7 +146,7 @@ Status PipePosix::CreateWithUniqueName(llvm::StringRef prefix, Status PipePosix::OpenAsReader(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened"); `` https://github.com/llvm/llvm-project/pull/90572 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix lock guads in PipePosix.cpp (PR #90572)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/90572 Guard object destroyed immediately after creation without naming. >From 7be6091ee5a4509bfec231adfdab3bc135112070 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Tue, 30 Apr 2024 10:05:02 +0200 Subject: [PATCH] Fix lock guads in PipePosix.cpp Guard object destroyed immediately after creation without naming. --- lldb/source/Host/posix/PipePosix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index afd3fe39059ac1..f35c348990df62 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -108,7 +108,7 @@ Status PipePosix::CreateNew(bool child_processes_inherit) { } Status PipePosix::CreateNew(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened"); @@ -146,7 +146,7 @@ Status PipePosix::CreateWithUniqueName(llvm::StringRef prefix, Status PipePosix::OpenAsReader(llvm::StringRef name, bool child_process_inherit) { - std::scoped_lock (m_read_mutex, m_write_mutex); + std::scoped_lock guard(m_read_mutex, m_write_mutex); if (CanReadUnlocked() || CanWriteUnlocked()) return Status("Pipe is already opened"); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits