mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
user: Declare get_task_state() once in 'accel/tcg/vcpu-state.h'
While each user emulation implentation defines its own TaskState structure, both use the same get_task_state() declaration, in particular in common code (such gdbstub). Declare the method once in "accel/tcg/vcpu-state.h". Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240428221450.26460-10-philmd@linaro.org>
This commit is contained in:
parent
ef932e21bd
commit
8019601324
3 changed files with 20 additions and 10 deletions
18
accel/tcg/vcpu-state.h
Normal file
18
accel/tcg/vcpu-state.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* SPDX-FileContributor: Philippe Mathieu-Daudé <philmd@linaro.org>
|
||||
* SPDX-FileCopyrightText: 2023 Linaro Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#ifndef ACCEL_TCG_VCPU_STATE_H
|
||||
#define ACCEL_TCG_VCPU_STATE_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
static inline TaskState *get_task_state(const CPUState *cs)
|
||||
{
|
||||
return cs->opaque;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue