Pool initialization is split into its own header file.
This is because the pool is RTOS-aware. When an RTOS is present, the pool will adjust and use semaphores to ensure consistent behavior in a multi-threaded environment. The intention behind a separate header is to isolate this RTOS dependency, so not every asset which uses the SRF inherits the dependency. This file should be included only when initializing a request pool.
Refer to Secure Request Pool Library for more information.
API Reference | |
| Data Structures | |
Macros | |
| #define | MTB_SRF_POOL_ENTRY_SIZE(input_values_length, output_values_length) |
| A tool to calculate how much memory to provide for a pool. | |
Functions | |
| cy_rslt_t | mtb_srf_pool_init (mtb_srf_pool_t *pool, uint32_t *allocated_mem, size_t num_entries, size_t input_len_per_entry, size_t output_len_per_entry) |
| Initializes a secure request pool instance. | |
| #define MTB_SRF_POOL_ENTRY_SIZE | ( | input_values_length, | |
| output_values_length ) |
A tool to calculate how much memory to provide for a pool.
| cy_rslt_t mtb_srf_pool_init | ( | mtb_srf_pool_t * | pool, |
| uint32_t * | allocated_mem, | ||
| size_t | num_entries, | ||
| size_t | input_len_per_entry, | ||
| size_t | output_len_per_entry ) |
Initializes a secure request pool instance.
| [in,out] | pool | Stores state that secure request pool needs to track between calls. The caller must allocate shared memory for this struct but should not depend on its contents. |
| [in] | allocated_mem | Pointer to a section of memory allocated by the caller for the pool to use. Recommend using (MTB_SRF_POOL_ENTRY_SIZE
|
| [in] | num_entries | The number of secure request objects that should fit into the pool |
| [in] | input_len_per_entry | The length of input argument array. The default value is MTB_SRF_MAX_ARG_IN_SIZE |
| [in] | output_len_per_entry | The length of output argument array. The default value is MTB_SRF_MAX_ARG_OUT_SIZE |
Initializes a secure request pool instance.