[Lldb-commits] [PATCH] Fixes http://reviews.llvm.org/rL230691
Chaoren Lin
chaorenl at google.com
Fri Feb 27 10:01:42 PST 2015
@Greg, the author of the other fix and I have sort of decided among
ourselves to abandon his fix and use this instead.
@Zach, would it be better if I just rewrote this entire test with C++11
instead of C? Should that be a general rule for all tests in the future?
On Fri, Feb 27, 2015 at 9:40 AM, Zachary Turner <zturner at google.com> wrote:
> REPOSITORY
> rL LLVM
>
> ================
> Comment at:
> lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/main.cpp:58
> @@ -56,3 +57,3 @@
>
> - pthread_barrier_wait(&g_barrier);
> + while (!g_ready);
>
> ----------------
> std::condition_variable?
>
> ================
> Comment at:
> lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/main.cpp:65
> @@ -63,3 +64,3 @@
> // random micro second sleep from zero to 3 seconds
> int usec = ::rand() % 3000000;
> printf ("%s (thread = %u) doing a usleep (%d)...\n",
> __FUNCTION__, thread_index, usec);
> ----------------
> I understand this isn't your code, but RAND_MAX is not guaranteed to be >
> 32768. On Windows, it isn't. std::random would be better here.
>
> ================
> Comment at:
> lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/main.cpp:93-95
> @@ -93,5 +92,5 @@
> // Create 3 threads
> err = ::pthread_create (&g_thread_1, NULL, thread_func,
> &thread_index_1);
> err = ::pthread_create (&g_thread_2, NULL, thread_func,
> &thread_index_2);
> err = ::pthread_create (&g_thread_3, NULL, thread_func,
> &thread_index_3);
>
> ----------------
> Since we're already bringing in std::atomic, how about std::thread while
> we're at it? That would make this testcase compile on Windows.
>
> http://reviews.llvm.org/D7933
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150227/6cf03b53/attachment.html>
More information about the lldb-commits
mailing list