mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
tpm-be: call request_completed() out of thread
Lift from the backend implementation the responsability to call the request_completed() callback outside of thread context. This also simplify frontend/interface work, as they no longer need to care whether the callback is called from a different thread. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
36e8658924
commit
689990598a
6 changed files with 27 additions and 29 deletions
|
@ -40,7 +40,6 @@ typedef struct TPMIf {
|
|||
typedef struct TPMIfClass {
|
||||
InterfaceClass parent_class;
|
||||
|
||||
/* run in thread pool by backend */
|
||||
void (*request_completed)(TPMIf *obj);
|
||||
} TPMIfClass;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ struct TPMBackend {
|
|||
bool opened;
|
||||
GThreadPool *thread_pool;
|
||||
bool had_startup_error;
|
||||
QEMUBH *bh;
|
||||
|
||||
/* <public> */
|
||||
char *id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue