diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-24 08:41:56 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-01-29 21:04:10 +1000 |
commit | f5e9362af1ad9514fb2cb283cecaa723b5c6cc40 (patch) | |
tree | 9a3c6b243eed5242dea1cf4f03d7402bb76f53d1 /accel | |
parent | 82607a73f8f6dc84d50a7f9b04ab740cc493d1cc (diff) |
accel/tcg/cpu-exec: Use RCU_READ_LOCK_GUARD
Replace the manual rcu_read_(un)lock calls in cpu_exec().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240124074201.8239-2-philmd@linaro.org>
[rth: Use RCU_READ_LOCK_GUARD not WITH_RCU_READ_LOCK_GUARD]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/cpu-exec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 40c268bfa1..950dad63cb 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1050,7 +1050,7 @@ int cpu_exec(CPUState *cpu) return EXCP_HALTED; } - rcu_read_lock(); + RCU_READ_LOCK_GUARD(); cpu_exec_enter(cpu); /* @@ -1064,8 +1064,6 @@ int cpu_exec(CPUState *cpu) ret = cpu_exec_setjmp(cpu, &sc); cpu_exec_exit(cpu); - rcu_read_unlock(); - return ret; } |