aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp10
1 files changed, 3 insertions, 7 deletions
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;