aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/ldst_atomicity.c.inc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-07-07 21:40:52 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-07-15 08:02:32 +0100
commitbef6f008b9811d961fd311c102f1a22dc28278a1 (patch)
tree4ad2dbec9cb5b560a8dfaf400f0bbf191aca7344 /accel/tcg/ldst_atomicity.c.inc
parent91e9e116fea2a3b957e86daf55c832155fdf4b04 (diff)
accel/tcg: Return bool from page_check_range
Replace the 0/-1 result with true/false. Invert the sense of the test of all callers. Document the function. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230707204054.8792-25-richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/ldst_atomicity.c.inc')
-rw-r--r--accel/tcg/ldst_atomicity.c.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/tcg/ldst_atomicity.c.inc b/accel/tcg/ldst_atomicity.c.inc
index de70531a7a..4de0a80492 100644
--- a/accel/tcg/ldst_atomicity.c.inc
+++ b/accel/tcg/ldst_atomicity.c.inc
@@ -159,7 +159,7 @@ static uint64_t load_atomic8_or_exit(CPUArchState *env, uintptr_t ra, void *pv)
* another process, because the fallback start_exclusive solution
* provides no protection across processes.
*/
- if (!page_check_range(h2g(pv), 8, PAGE_WRITE_ORG)) {
+ if (page_check_range(h2g(pv), 8, PAGE_WRITE_ORG)) {
uint64_t *p = __builtin_assume_aligned(pv, 8);
return *p;
}
@@ -194,7 +194,7 @@ static Int128 load_atomic16_or_exit(CPUArchState *env, uintptr_t ra, void *pv)
* another process, because the fallback start_exclusive solution
* provides no protection across processes.
*/
- if (!page_check_range(h2g(p), 16, PAGE_WRITE_ORG)) {
+ if (page_check_range(h2g(p), 16, PAGE_WRITE_ORG)) {
return *p;
}
#endif