mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
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>
This commit is contained in:
parent
91e9e116fe
commit
bef6f008b9
9 changed files with 31 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue