summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_alloc.cpp
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2017-07-03 11:24:08 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2017-07-03 11:24:08 +0000
commitc47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536 (patch)
treee60d61609965cc9833222b875464f35cbc23aeab /openmp/runtime/src/kmp_alloc.cpp
parent5c787ab346c3517f987d7f872a9e653d74d7a5df (diff)
downloadbcm5719-llvm-c47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536.tar.gz
bcm5719-llvm-c47afcd9bbe5c5bca9dc1e1e064ea46bb2a83536.zip
OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.
Changes are: replaced C-style casts with cons_cast and reinterpret_cast; type of several counters changed to signed; type of parameters of 32-bit and 64-bit AND and OR intrinsics changes to unsigned; changed files formatted using clang-format version 3.8.1. Differential Revision: https://reviews.llvm.org/D34759 llvm-svn: 307020
Diffstat (limited to 'openmp/runtime/src/kmp_alloc.cpp')
-rw-r--r--openmp/runtime/src/kmp_alloc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/openmp/runtime/src/kmp_alloc.cpp b/openmp/runtime/src/kmp_alloc.cpp
index 9226a4335a7..6695fb32a5a 100644
--- a/openmp/runtime/src/kmp_alloc.cpp
+++ b/openmp/runtime/src/kmp_alloc.cpp
@@ -298,12 +298,12 @@ static void __kmp_bget_dequeue(kmp_info_t *th) {
#if USE_CMP_XCHG_FOR_BGET
{
volatile void *old_value = TCR_SYNC_PTR(th->th.th_local.bget_list);
- while (!KMP_COMPARE_AND_STORE_PTR(&th->th.th_local.bget_list, old_value,
- NULL)) {
+ while (!KMP_COMPARE_AND_STORE_PTR(&th->th.th_local.bget_list,
+ CCAST(void *, old_value), NULL)) {
KMP_CPU_PAUSE();
old_value = TCR_SYNC_PTR(th->th.th_local.bget_list);
}
- p = (void *)old_value;
+ p = CCAST(void *, old_value);
}
#else /* ! USE_CMP_XCHG_FOR_BGET */
#ifdef USE_QUEUING_LOCK_FOR_BGET
@@ -362,15 +362,15 @@ static void __kmp_bget_enqueue(kmp_info_t *th, void *buf
volatile void *old_value = TCR_PTR(th->th.th_local.bget_list);
/* the next pointer must be set before setting bget_list to buf to avoid
exposing a broken list to other threads, even for an instant. */
- b->ql.flink = BFH(old_value);
+ b->ql.flink = BFH(CCAST(void *, old_value));
- while (!KMP_COMPARE_AND_STORE_PTR(&th->th.th_local.bget_list, old_value,
- buf)) {
+ while (!KMP_COMPARE_AND_STORE_PTR(&th->th.th_local.bget_list,
+ CCAST(void *, old_value), buf)) {
KMP_CPU_PAUSE();
old_value = TCR_PTR(th->th.th_local.bget_list);
/* the next pointer must be set before setting bget_list to buf to avoid
exposing a broken list to other threads, even for an instant. */
- b->ql.flink = BFH(old_value);
+ b->ql.flink = BFH(CCAST(void *, old_value));
}
}
#else /* ! USE_CMP_XCHG_FOR_BGET */
@@ -607,7 +607,7 @@ static void *bget(kmp_info_t *th, bufsize requested_size) {
if (thr->acqfcn != 0) {
if (size > (bufsize)(thr->exp_incr - sizeof(bhead_t))) {
/* Request is too large to fit in a single expansion block.
- Try to satisy it by a direct buffer acquisition. */
+ Try to satisy it by a direct buffer acquisition. */
bdhead_t *bdh;
size += sizeof(bdhead_t) - sizeof(bhead_t);
OpenPOWER on IntegriCloud