gcc/ck_pr: Fix ck_pr_md_load_ptr() and ck_pr_md_store_ptr().

In an attempt to prevent gcc from emiting warnings, ck_pr_md_load_ptr and
ck_pr_md_store_ptr were made wrong in commit
5ae12a19d0.
load_ptr would return target instead of *target, and store would store the
value in target instead of in *target.
This is an attempt at fixing this, while still trying to avoid warnings.
cos
Olivier Houchard 7 years ago
parent 0bd946d6a0
commit bcecb8a916

@ -80,7 +80,7 @@ ck_pr_md_load_ptr(const void *target)
void *r;
ck_pr_barrier();
r = CK_CC_DECONST_PTR(CK_PR_ACCESS(target));
r = CK_CC_DECONST_PTR(*(volatile void *const*)(target));
ck_pr_barrier();
return r;
@ -91,7 +91,7 @@ ck_pr_md_store_ptr(void *target, const void *v)
{
ck_pr_barrier();
CK_PR_ACCESS(target) = CK_CC_DECONST_PTR(v);
*(volatile void **)target = CK_CC_DECONST_PTR(v);
ck_pr_barrier();
return;
}

Loading…
Cancel
Save