[Openmp-commits] [openmp] r273439 - Fix bug in futex fast path inside kmp_csupport.c

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 22 09:36:07 PDT 2016


Author: jlpeyton
Date: Wed Jun 22 11:36:07 2016
New Revision: 273439

URL: http://llvm.org/viewvc/llvm-project?rev=273439&view=rev
Log:
Fix bug in futex fast path inside kmp_csupport.c

Modified:
    openmp/trunk/runtime/src/kmp_csupport.c

Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=273439&r1=273438&r2=273439&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Wed Jun 22 11:36:07 2016
@@ -988,7 +988,7 @@ __kmp_init_indirect_csptr(kmp_critical_n
 // Fast-path test futex lock
 #define KMP_TEST_FUTEX_LOCK(lock, gtid, rc) {                                                                       \
     kmp_futex_lock_t *ftx = (kmp_futex_lock_t *)lock;                                                               \
-    if (KMP_COMPARE_AND_STORE_ACQ32(&(ftx->lk.poll), KMP_LOCK_FREE(futex), KMP_LOCK_BUSY(gtid+1, futex) << 1)) {    \
+    if (KMP_COMPARE_AND_STORE_ACQ32(&(ftx->lk.poll), KMP_LOCK_FREE(futex), KMP_LOCK_BUSY(gtid+1 << 1, futex))) {    \
         KMP_FSYNC_ACQUIRED(ftx);                                                                                    \
         rc = TRUE;                                                                                                  \
     } else {                                                                                                        \




More information about the Openmp-commits mailing list