tpm2-tss  master
TPM Software stack 2.0 TCG spec compliant implementation
Fapi_GetPollHandles

Functions

TSS2_RC Fapi_GetPollHandles (FAPI_CONTEXT *context, FAPI_POLL_HANDLE **handles, size_t *num_handles)
 

Detailed Description

FAPI function to retrieve the poll handles currently used by the corresponding FAPI_CONTEXT.

Function Documentation

◆ Fapi_GetPollHandles()

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

Parameters
[in,out]contextThe FAPI_CONTEXT
[out]handlesAn array of poll handle entries
[out]num_handlesThe size of the array in handles
Return values
TSS2_RC_SUCCESSif the function call was a success.
TSS2_FAPI_RC_BAD_REFERENCEif context or data is NULL.
TSS2_FAPI_RC_BAD_CONTEXTif context corruption is detected.
TSS2_FAPI_RC_BAD_SEQUENCEif the context has no asynchronous operation pending.
TSS2_FAPI_RC_NO_HANDLEif there are no handles to poll on
TSS2_FAPI_RC_MEMORYif the FAPI cannot allocate enough memory for internal operations or return parameters.