Skip to content

Commit c2be208

Browse files
committed
Merging r361158:
------------------------------------------------------------------------ r361158 | jprotze | 2019-05-20 07:21:42 -0700 (Mon, 20 May 2019) | 11 lines [OpenMP][OMPT] Fix locking testcases for 32 bit architectures https://reviews.llvm.org/D58454 did not fix the problem for a typical use case of building LLVM with gcc or icc and then testing with the newly built clang compiler. The compilers do not agree on how to extend a 32-bit pointer to uint64, so make the pointer unsigned first, before adjusting the size. Patch by Joachim Protze Differential Revision: https://reviews.llvm.org/D58506 ------------------------------------------------------------------------ llvm-svn: 363628
1 parent 2fb27a2 commit c2be208

File tree

5 files changed

+76
-67
lines changed

5 files changed

+76
-67
lines changed

openmp/runtime/src/kmp_atomic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomic_lock_t *lck,
364364
#if OMPT_SUPPORT && OMPT_OPTIONAL
365365
if (ompt_enabled.ompt_callback_mutex_acquire) {
366366
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)(
367-
ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)lck,
367+
ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)(uintptr_t)lck,
368368
OMPT_GET_RETURN_ADDRESS(0));
369369
}
370370
#endif
@@ -374,7 +374,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomic_lock_t *lck,
374374
#if OMPT_SUPPORT && OMPT_OPTIONAL
375375
if (ompt_enabled.ompt_callback_mutex_acquired) {
376376
ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)(
377-
ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
377+
ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0));
378378
}
379379
#endif
380380
}
@@ -390,7 +390,7 @@ static inline void __kmp_release_atomic_lock(kmp_atomic_lock_t *lck,
390390
#if OMPT_SUPPORT && OMPT_OPTIONAL
391391
if (ompt_enabled.ompt_callback_mutex_released) {
392392
ompt_callbacks.ompt_callback(ompt_callback_mutex_released)(
393-
ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0));
393+
ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0));
394394
}
395395
#endif
396396
}

0 commit comments

Comments
 (0)