[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 70/71] cpus-common: move exclusive_idle higher
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC v4 70/71] cpus-common: move exclusive_idle higher in the file |
Date: |
Mon, 29 Oct 2018 15:21:50 +0000 |
User-agent: |
mu4e 1.1.0; emacs 26.1.50 |
Emilio G. Cota <address@hidden> writes:
> This will simplify the following commit's diff.
>
> Signed-off-by: Emilio G. Cota <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
> ---
> cpus-common.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/cpus-common.c b/cpus-common.c
> index 232cb12c46..ad8a8ef535 100644
> --- a/cpus-common.c
> +++ b/cpus-common.c
> @@ -73,6 +73,15 @@ static void finish_safe_work(CPUState *cpu)
> cpu_exec_end(cpu);
> }
>
> +/* Wait for pending exclusive operations to complete. The CPU list lock
> + must be held. */
> +static inline void exclusive_idle(void)
> +{
> + while (pending_cpus) {
> + qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
> + }
> +}
> +
> void cpu_list_add(CPUState *cpu)
> {
> qemu_mutex_lock(&qemu_cpu_list_lock);
> @@ -200,15 +209,6 @@ void async_run_on_cpu_no_bql(CPUState *cpu,
> run_on_cpu_func func,
> queue_work_on_cpu(cpu, wi);
> }
>
> -/* Wait for pending exclusive operations to complete. The CPU list lock
> - must be held. */
> -static inline void exclusive_idle(void)
> -{
> - while (pending_cpus) {
> - qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
> - }
> -}
> -
> /* Start an exclusive operation.
> Must only be called from outside cpu_exec. */
> void start_exclusive(void)
--
Alex Bennée
- Re: [Qemu-devel] [RFC v4 49/71] nios: convert to cpu_interrupt_request, (continued)
- [Qemu-devel] [RFC v4 48/71] mips: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 31/71] ppc: use cpu_reset_interrupt, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 43/71] sh4: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 70/71] cpus-common: move exclusive_idle higher in the file, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 24/71] s390x: convert to cpu_halted, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 53/71] sparc: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 55/71] unicore32: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC v4 47/71] m68k: convert to cpu_interrupt_request, Emilio G. Cota, 2018/10/25