Lines Matching defs:index

894  * the index if there is a match.  If no_match_indexp is non-NULL it
895 * will be assigned with the index to insert the item (even if it was
900 int index=-1;
925 index = hi;
932 return index;
941 int index, no_match_index;
945 return 0; // table is empty, so insert at index=0 and report no match
956 index = cache_binSearch(cache->acache, hi, parent_id, &no_match_index);
958 /* if no existing entry found, find index for new one */
959 if (index == -1) {
960 index = no_match_index;
966 *indexp = index;
971 * Add a node to the access_cache at the given index (or do a lookup first
972 * to find the index if -1 is passed in). We currently do a replace rather
976 add_node(struct access_cache *cache, int index, cnid_t nodeID, int access)
980 /* need to do a lookup first if -1 passed for index */
981 if (index == -1) {
991 index = lookup_index;
998 //printf("hfs: cache is full (%d). replace at index %d\n", cache->numcached, index);
1001 if (index > cache->numcached) {
1002 // printf("hfs: index %d pinned to %d\n", index, cache->numcached);
1003 index = cache->numcached;
1007 if (index < cache->numcached && index < NUM_CACHE_ENTRIES && nodeID > cache->acache[index]) {
1008 index++;
1011 if (index >= 0 && index < cache->numcached) {
1013 bcopy( cache->acache+index, cache->acache+(index+1), (cache->numcached - index)*sizeof(int) );
1014 bcopy( cache->haveaccess+index, cache->haveaccess+(index+1), (cache->numcached - index)*sizeof(unsigned char) );
1017 cache->acache[index] = nodeID;
1018 cache->haveaccess[index] = access;
4148 panic ("hfs_vnop_pageout: unforeseen clean page @ index %d for UPL %p\n", pg_index, upl);