[Openmp-commits] [openmp] r264934 - Fix bug when KMP_USE_ADAPTIVE_LOCKS is 0

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 30 14:50:59 PDT 2016


Author: jlpeyton
Date: Wed Mar 30 16:50:59 2016
New Revision: 264934

URL: http://llvm.org/viewvc/llvm-project?rev=264934&view=rev
Log:
Fix bug when KMP_USE_ADAPTIVE_LOCKS is 0

#endif was one line too low.  If KMP_USE_ADAPTIVE_LOCKS is 0,
then queuing locks would incorrectly use drdpa lock mechanism.
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=26649

Modified:
    openmp/trunk/runtime/src/kmp_lock.cpp

Modified: openmp/trunk/runtime/src/kmp_lock.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_lock.cpp?rev=264934&r1=264933&r2=264934&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_lock.cpp (original)
+++ openmp/trunk/runtime/src/kmp_lock.cpp Wed Mar 30 16:50:59 2016
@@ -3468,8 +3468,8 @@ __kmp_get_user_lock_owner(kmp_user_lock_
         case lockseq_nested_queuing:
 #if KMP_USE_ADAPTIVE_LOCKS
         case lockseq_adaptive:
-            return __kmp_get_queuing_lock_owner((kmp_queuing_lock_t *)lck);
 #endif
+            return __kmp_get_queuing_lock_owner((kmp_queuing_lock_t *)lck);
         case lockseq_drdpa:
         case lockseq_nested_drdpa:
             return __kmp_get_drdpa_lock_owner((kmp_drdpa_lock_t *)lck);




More information about the Openmp-commits mailing list