fsl_shw_return_t shw_slot_alloc(void *user_data, uint32_t size, uint64_t owner_id, uint32_t *slot) { scc_return_t retval; #ifdef DIAG_DRV_IF LOG_DIAG_ARGS("key length: %i, handle: %i\n", size, *slot); #endif retval = scc_alloc_slot(size, owner_id, slot); if (retval == SCC_RET_OK) return FSL_RETURN_OK_S; return FSL_RETURN_NO_RESOURCE_S; }
/*! * Allocates a slot in the SCC * * @brief Allocates a slot in the SCC * * @param user_ctx * @param key_len * @param ownerid * @param slot * * @return A return code of type #fsl_shw_return_t. */ fsl_shw_return_t do_scc_slot_alloc(fsl_shw_uco_t * user_ctx, uint32_t key_len, uint64_t ownerid, uint32_t * slot) { scc_return_t scc_status = scc_alloc_slot(key_len, ownerid, slot); fsl_shw_return_t ret; if (scc_status == SCC_RET_OK) { ret = FSL_RETURN_OK_S; } else { ret = FSL_RETURN_NO_RESOURCE_S; } user_ctx = NULL; return ret; }