2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * This function will be used by metaslot to get the kernel 2N/A * provider's threshold value for the supported mechanisms. 2N/A * We alway use the 1st slot in the kernel to 2N/A * get the threshold because all the kernel 2N/A * slots will have the same threshold value 2N/A * with the same mechanism. 2N/A * To retrieve the crypto_function_list structure with boolean entries 2N/A * indicating which functions are supported by the hardware provider which 2N/A * is specified by the slot ID. 2N/A /* copy data structure received from kernel */ 2N/A * Initialize the slot table. 2N/A * This function is called from C_Initialize() only. Since C_Initialize() 2N/A * holds the global mutex lock, there is no need to acquire another lock 2N/A * in this routine to protect the slot table. 2N/A * Find out how many slots are presented from kernel hardware 2N/A * providers. If there is no slot presented, just return. 2N/A /* Allocate space for the slot table */ 2N/A /* For each slot, allocate space and initialize the slot's mutex. */ 2N/A /* Initialize this slot's mutex */ 2N/A * Get the provider ID for each slot from kernel and save it in the 2N/A * Get the function list for each slot from kernel and save it in