mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
cpu: Pass CPUState to cpu_interrupt()
Move it to qom/cpu.h to avoid issues with include order. Change pc_acpi_smi_interrupt() opaque to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
d8ed887bdc
commit
c3affe5670
37 changed files with 106 additions and 99 deletions
|
@ -421,19 +421,6 @@ DECLARE_TLS(CPUArchState *,cpu_single_env);
|
|||
| CPU_INTERRUPT_TGT_EXT_3 \
|
||||
| CPU_INTERRUPT_TGT_EXT_4)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
typedef void (*CPUInterruptHandler)(CPUArchState *, int);
|
||||
|
||||
extern CPUInterruptHandler cpu_interrupt_handler;
|
||||
|
||||
static inline void cpu_interrupt(CPUArchState *s, int mask)
|
||||
{
|
||||
cpu_interrupt_handler(s, mask);
|
||||
}
|
||||
#else /* USER_ONLY */
|
||||
void cpu_interrupt(CPUArchState *env, int mask);
|
||||
#endif /* USER_ONLY */
|
||||
|
||||
void cpu_exit(CPUArchState *s);
|
||||
|
||||
/* Breakpoint/watchpoint flags */
|
||||
|
|
|
@ -221,6 +221,30 @@ void run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
|
|||
*/
|
||||
CPUState *qemu_get_cpu(int index);
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
typedef void (*CPUInterruptHandler)(CPUState *, int);
|
||||
|
||||
extern CPUInterruptHandler cpu_interrupt_handler;
|
||||
|
||||
/**
|
||||
* cpu_interrupt:
|
||||
* @cpu: The CPU to set an interrupt on.
|
||||
* @mask: The interupts to set.
|
||||
*
|
||||
* Invokes the interrupt handler.
|
||||
*/
|
||||
static inline void cpu_interrupt(CPUState *cpu, int mask)
|
||||
{
|
||||
cpu_interrupt_handler(cpu, mask);
|
||||
}
|
||||
|
||||
#else /* USER_ONLY */
|
||||
|
||||
void cpu_interrupt(CPUState *cpu, int mask);
|
||||
|
||||
#endif /* USER_ONLY */
|
||||
|
||||
/**
|
||||
* cpu_reset_interrupt:
|
||||
* @cpu: The CPU to clear the interrupt on.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue