Lines Matching defs:index

221 	unsigned long index, num_found = 0;
232 found = find_mech_index(mech_support_info->mech, &index);
239 if (!mechlist[index].slots[i].initialized ||
240 !mechlist[index].slots[i].supported)
244 info = mechlist[index].slots[i].mechanism_info;
252 = &mechlist[index].slots[i];
286 unsigned long index = 0;
290 rv = meta_mechManager_allocmechs(&mech, 1, &index);
298 * index as a hint to quickly find the mechanism.
300 found = find_mech_index(mech, &index);
309 if (force_refresh || !mechlist[index].slots[slot].initialized) {
310 rv = update_slotmech(mech, slot, index);
337 unsigned long index = 0;
398 &index);
405 found = find_mech_index(slot_mechlist[mechnum], &index);
412 rv = update_slotmech(slot_mechlist[mechnum], slotnum, index);
446 unsigned long index)
452 mechlist[index].slots[slotnum].slotnum = slotnum;
466 mechlist[index].slots[slotnum].initialized = B_TRUE;
467 mechlist[index].slots[slotnum].supported = B_FALSE;
468 bzero(&mechlist[index].slots[slotnum].mechanism_info,
475 mechlist[index].slots[slotnum].initialized = B_TRUE;
476 mechlist[index].slots[slotnum].supported = B_TRUE;
477 mechlist[index].slots[slotnum].mechanism_info = info;
480 mechlist[index].slots[slotnum].initialized = B_TRUE;
481 mechlist[index].slots[slotnum].supported = B_FALSE;
482 bzero(&mechlist[index].slots[slotnum].mechanism_info,
498 * The returned index can be used by the caller as a hint to where the
506 unsigned long i, index = 0;
512 found = find_mech_index(new_mechs[i], &index);
515 *index_hint = index;
534 found = find_mech_index(new_mechs[i], &index);
568 (void) memmove(&mechlist[index+1], &mechlist[index],
569 (num_mechs - index) * sizeof (mechlist_t));
572 mechlist[index].type = new_mechs[i];
573 mechlist[index].slots = new_mechinfos;
588 * returns if the mechanism was found or not. The value of the "index"
592 * The current value of "index" will be used as a starting point, if the
596 * from being changed while searching (also to ensure the returned index
605 find_mech_index(CK_MECHANISM_TYPE mechanism, unsigned long *index)
621 *index = i;
653 unsigned long index;
664 found = find_mech_index(mechanism, &index);
669 if ((mechlist[index].slots[slotnum].initialized) &&
670 (mechlist[index].slots[slotnum].supported)) {
672 info = mechlist[index].slots[slotnum].mechanism_info;
679 *slot_info = &(mechlist[index].slots[slotnum]);