diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
| commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
| tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp | |
| parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) | |
Notes
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.cpp | 10 |
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; |
