Skip to contentSkip to conversation

cpus: Drop declaration of cpu_remove()

PATCH Applied Greg Kurz 3 participants 3 messages Oct 14, 2020 – Oct 26, 2020

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH 1/1 cpus: Drop declaration of cpu_remove()

cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0, but its prototype wasn't removed. We could possibly keep the shorter cpu_remove() naming but it seems better to highligth that this blocks until the CPU thread is joined.

Fixes dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
---
 include/hw/core/cpu.h |    8 --------
 1 file changed, 8 deletions(-)
include/hw/core/cpu.h +0 -8
index 4879f2502659..ace443e88297 100644
@@ -924,14 +924,6 @@ void cpu_exit(CPUState *cpu);
 void cpu_resume(CPUState *cpu);
 
 /**
- * cpu_remove:
- * @cpu: The CPU to remove.
- *
- * Requests the CPU to be removed.
- */
-void cpu_remove(CPUState *cpu);
-
- /**
  * cpu_remove_sync:
  * @cpu: The CPU to remove.
  *
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Greg Kurz

cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0, but its prototype wasn't removed. We could possibly keep the shorter cpu_remove() naming but it seems better to highligth that this blocks until the CPU thread is joined.

Fixes dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
---
  include/hw/core/cpu.h |    8 --------
  1 file changed, 8 deletions(-)
#2 lore raw
In reply to Greg Kurz

Le 14/10/2020 à 15:40, Greg Kurz a écrit :

Quoted 24 lines

cpu_remove() got superseded by cpu_remove_sync() in commit dbadee4ff4a0, but its prototype wasn't removed. We could possibly keep the shorter cpu_remove() naming but it seems better to highligth that this blocks until the CPU thread is joined.

Fixes dbadee4ff4a0 ("cpus: join thread when removing a vCPU")
---
 include/hw/core/cpu.h |    8 --------
 1 file changed, 8 deletions(-)
include/hw/core/cpu.h +0 -1
index 4879f2502659..ace443e88297 100644
@@ -924,14 +924,6 @@ void cpu_exit(CPUState *cpu);
 void cpu_resume(CPUState *cpu);
 
 /**
- * cpu_remove:

include/hw/core/cpu.h void cpu_exit(CPUState *cpu); · line 929

Quoted 10 lines
include/hw/core/cpu.h +0 -7
- * @cpu: The CPU to remove.
- *
- * Requests the CPU to be removed.
- */
-void cpu_remove(CPUState *cpu);
-
- /**
  * cpu_remove_sync:
  * @cpu: The CPU to remove.
  *

Applied to my trivial-patches branch.

Thanks,
Laurent