mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
accel: extend AccelState and AccelClass to user-mode
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [claudio: rebased on Richard's splitwx work] Signed-off-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20210204163931.7358-17-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7827168471
commit
940e43aa30
24 changed files with 125 additions and 53 deletions
24
accel/accel-user.c
Normal file
24
accel/accel-user.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* QEMU accel class, user-mode components
|
||||
*
|
||||
* Copyright 2021 SUSE LLC
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/accel.h"
|
||||
|
||||
AccelState *current_accel(void)
|
||||
{
|
||||
static AccelState *accel;
|
||||
|
||||
if (!accel) {
|
||||
AccelClass *ac = accel_find("tcg");
|
||||
|
||||
g_assert(ac != NULL);
|
||||
accel = ACCEL(object_new_with_class(OBJECT_CLASS(ac)));
|
||||
}
|
||||
return accel;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue