Lines Matching defs:cache

75   DirNode *head;       /* The head of the list of used and unused cache nodes */
77 DirNode *tail; /* The tail of the list of unused cache nodes */
81 * Specify how many directory cache nodes to allocate at a time.
105 DirCache cache; /* The cache of directory reader objects */
180 ef->cache.mem = NULL;
181 ef->cache.head = NULL;
182 ef->cache.next = NULL;
183 ef->cache.tail = NULL;
203 * Allocate a freelist for allocating directory cache nodes.
205 ef->cache.mem = _new_FreeList(sizeof(DirNode), DIR_CACHE_BLK);
206 if(!ef->cache.mem)
252 for(dnode=ef->cache.head; dnode; dnode=dnode->next)
258 ef->cache.mem = _del_FreeList(ef->cache.mem, 1);
259 ef->cache.head = ef->cache.tail = ef->cache.next = NULL;
350 DirNode *dnode; /* A directory-reader cache node */
378 * a copy of the resulting pattern in the cache.
418 * cache.
604 * Attempt to make a copy of the pathname in the cache.
635 * Record a pathname in the cache.
675 * Get a new directory reader object from the cache.
681 * return DirNode * The cache entry of the new directory reader,
688 DirNode *node; /* The cache node used */
690 * Get the directory reader cache.
692 DirCache *cache = &ef->cache;
694 * Extend the cache if there are no free cache nodes.
696 if(!cache->next) {
697 node = (DirNode *) _new_FreeListNode(cache->mem);
704 * Initialize the cache node.
716 node = (DirNode *) _del_FreeListNode(cache->mem, node);
720 * Append the node to the cache list.
722 node->prev = cache->tail;
723 if(cache->tail)
724 cache->tail->next = node;
726 cache->head = node;
727 cache->next = cache->tail = node;
732 node = cache->next;
742 * remove the cache node from the list, and relink the list around it.
744 cache->next = node->next;
748 cache->head = node->next;
752 cache->tail = node->prev;
755 * Return the successfully initialized cache node to the caller.
761 * Return a directory reader object to the cache, after first closing
766 * node DirNode * The cache entry of the directory reader, as returned
774 * Get the directory reader cache.
776 DirCache *cache = &ef->cache;
782 * Return the node to the tail of the cache list.
785 node->prev = cache->tail;
786 if(cache->tail)
787 cache->tail->next = node;
789 cache->head = cache->tail = node;
790 if(!cache->next)
791 cache->next = node;
1032 * ef->path as a work buffer, then copy the result into a cache entry,
1040 * cache. On error NULL is returned, and a description
1217 * Copy the result into the cache, and return a pointer to the copy.