summaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-10 00:55:55 +0200
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-10-19 11:42:28 -0400
commit0e43b7e61ce677e154584523943c1651779baccf (patch)
treeeeabafb7cfd3f4329350731663ad9ffca20b0c55 /backends
parentd1fd6b563d44a1132f8a5758f8f7bafba548502c (diff)
downloadqemu-0e43b7e61ce677e154584523943c1651779baccf.tar.gz
tpm: add TPMBackendCmd to hold the request state
This simplifies a bit locality handling, and argument passing, and could pave the way to queuing requests (if that makes sense). 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>
Diffstat (limited to 'backends')
-rw-r--r--backends/tpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/tpm.c b/backends/tpm.c
index 34e82085ec..dc7c831ff8 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -25,7 +25,7 @@ static void tpm_backend_worker_thread(gpointer data, gpointer user_data)
TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s);
assert(k->handle_request != NULL);
- k->handle_request(s);
+ k->handle_request(s, (TPMBackendCmd *)data);
}
static void tpm_backend_thread_end(TPMBackend *s)
@@ -76,9 +76,9 @@ bool tpm_backend_had_startup_error(TPMBackend *s)
return s->had_startup_error;
}
-void tpm_backend_deliver_request(TPMBackend *s)
+void tpm_backend_deliver_request(TPMBackend *s, TPMBackendCmd *cmd)
{
- g_thread_pool_push(s->thread_pool, NULL, NULL);
+ g_thread_pool_push(s->thread_pool, cmd, NULL);
}
void tpm_backend_reset(TPMBackend *s)