[PATCH] D28220: provide Win32 native threading

Andrey Khalyavin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 13:36:51 PST 2017


halyavin added inline comments.


================
Comment at: include/__threading_support:421
+    if (!SleepConditionVariableCS(__cv, __m,
+                                  duration_cast<milliseconds>(timeout).count()))
+      return GetLastError();
----------------
We can have integer overflow on cast to DWORD here and get unexpectedly small wait for large timeouts.


================
Comment at: include/__threading_support:458
+{
+  // TODO(compnerd) provide a wrapper for CC adjustment
+  *__t = reinterpret_cast<HANDLE>(_beginthreadex(
----------------
For other reviewers: CC means Calling Convention.


Repository:
  rL LLVM

https://reviews.llvm.org/D28220





More information about the cfe-commits mailing list