xref: /qemu/accel/accel-user.c (revision 06b40d250ecfa1633209c2e431a7a38acfd03a98)
1 /*
2  * QEMU accel class, user-mode components
3  *
4  * Copyright 2021 SUSE LLC
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  */
9 
10 #include "qemu/osdep.h"
11 #include "qemu/accel.h"
12 #include "accel-internal.h"
13 
accel_init_ops_interfaces(AccelClass * ac)14 void accel_init_ops_interfaces(AccelClass *ac)
15 {
16     /* nothing */
17 }
18 
current_accel(void)19 AccelState *current_accel(void)
20 {
21     static AccelState *accel;
22 
23     if (!accel) {
24         AccelClass *ac = accel_find("tcg");
25 
26         g_assert(ac != NULL);
27         accel = ACCEL(object_new_with_class(OBJECT_CLASS(ac)));
28     }
29     return accel;
30 }
31