From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- .../test/functionalities/watchpoint/multiple_threads/main.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp') diff --git a/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp b/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp index 8a31041f8fca..7f2e5e6e6cb5 100644 --- a/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp +++ b/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp @@ -23,8 +23,7 @@ uint32_t access_pool (bool flag = false) { static std::mutex g_access_mutex; - if (!flag) - g_access_mutex.lock(); + g_access_mutex.lock(); uint32_t old_val = g_val; if (flag) @@ -33,17 +32,14 @@ access_pool (bool flag = false) g_val = old_val + 1; } - if (!flag) - g_access_mutex.unlock(); + g_access_mutex.unlock(); return g_val; } void thread_func (uint32_t thread_index) { - // Break here in order to allow the thread - // to inherit the global watchpoint state. - printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index); + printf ("%s (thread index = %u) starting...\n", __FUNCTION__, thread_index); uint32_t count = 0; uint32_t val; -- cgit v1.2.3