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:
Marc-André Lureau 2017-11-06 19:39:02 +01:00 committed by Stefan Berger
parent 36e8658924
commit 689990598a
6 changed files with 27 additions and 29 deletions

View file

@ -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;

View file

@ -47,6 +47,7 @@ struct TPMBackend {
bool opened;
GThreadPool *thread_pool;
bool had_startup_error;
QEMUBH *bh;
/* <public> */
char *id;