summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp10
2 files changed, 3 insertions, 13 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
index 46e3e6e1a56..af8306c9a20 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
@@ -58,9 +58,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase):
'stop reason = breakpoint'])
# Now let's set a write-type watchpoint for variable 'g_val'.
- # The main.cpp, by design, misbehaves by not following the agreed upon
- # protocol of using a mutex while accessing the global pool and by not
- # writing to the variable.
self.expect("watchpoint set variable -w write g_val", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = w'])
@@ -102,9 +99,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase):
'stop reason = breakpoint'])
# Now let's set a write-type watchpoint for variable 'g_val'.
- # The main.cpp, by design, misbehaves by not following the agreed upon
- # protocol of using a mutex while accessing the global pool and by not
- # writing to the variable.
self.expect("watchpoint set variable -w write g_val", WATCHPOINT_CREATED,
substrs = ['Watchpoint created', 'size = 4', 'type = w'])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp
index 8a31041f8fc..7f2e5e6e6cb 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp
+++ b/lldb/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;
OpenPOWER on IntegriCloud