[Openmp-commits] [PATCH] D11821: [OpenMP] Initial testsuite change to purely llvm-lit based testing

hfinkel@anl.gov via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 29 11:55:35 PDT 2015


hfinkel added inline comments.

================
Comment at: runtime/test/omp_my_sleep.h:13
@@ +12,3 @@
+#if defined(_WIN32)
+# include <windows.h>
+
----------------
Why do we need windows.h here? clock() is in time.h.

================
Comment at: runtime/test/omp_my_sleep.h:53
@@ +52,3 @@
+  real = start;
+  while((real-start) < sleeptime) {
+    if(gettimeofday(&tv,&tzp)!=0) {
----------------
I don't understand why we're sleeping this way -- it is not really sleeping, but rather busy-waiting on the clock. Shouldn't we use something like nanosleep() instead?



Repository:
  rL LLVM

http://reviews.llvm.org/D11821





More information about the Openmp-commits mailing list