tpm2-tss
master
TPM Software stack 2.0 TCG spec compliant implementation
|
Functions | |
TSS2_RC | Fapi_GetPollHandles (FAPI_CONTEXT *context, FAPI_POLL_HANDLE **handles, size_t *num_handles) |
FAPI function to retrieve the poll handles currently used by the corresponding FAPI_CONTEXT.
Fapi_GetPollHandles | ( | FAPI_CONTEXT * | context, |
FAPI_POLL_HANDLE ** | handles, | ||
size_t * | num_handles | ||
) |
Retrieve handles for polling
Returns an array of handles that can be polled on to get notified when data from the TPM or from a disk operation is available.
The corresponding code should look similar to follows: do { r = Fapi_GetPollHandles(fc, &ph, &nph); if (r == TSS2_RC_SUCCESS) { poll(ph, nph, -1); Fapi_Free(ph); } r = Fapi_*_Finish(fc, ...); } while (r == TSS2_FAPI_RC_TRY_AGAIN);
[in,out] | context | The FAPI_CONTEXT |
[out] | handles | An array of poll handle entries |
[out] | num_handles | The size of the array in handles |
TSS2_RC_SUCCESS | if the function call was a success. |
TSS2_FAPI_RC_BAD_REFERENCE | if context or data is NULL. |
TSS2_FAPI_RC_BAD_CONTEXT | if context corruption is detected. |
TSS2_FAPI_RC_BAD_SEQUENCE | if the context has no asynchronous operation pending. |
TSS2_FAPI_RC_NO_HANDLE | if there are no handles to poll on |
TSS2_FAPI_RC_MEMORY | if the FAPI cannot allocate enough memory for internal operations or return parameters. |