• Home
  • Raw
  • Download

Lines Matching refs:pc

44 #define TRACE_HIT_CACHE(pc) do { pc->hit++; g_totalPathCacheHit++; } while (0)  argument
55 #define TRACE_HIT_CACHE(pc) argument
70 struct PathCache *pc = NULL; in PathCacheDump() local
73 LOS_DL_LIST_FOR_EACH_ENTRY(pc, nhead, struct PathCache, hashEntry) { in PathCacheDump()
75 pc->name, pc->parentVnode, pc->childVnode, pc->nameLen); in PathCacheDump()
114 struct PathCache *pc = NULL; in PathCacheAlloc() local
123 pc = (struct PathCache*)zalloc(pathCacheSize); in PathCacheAlloc()
124 if (pc == NULL) { in PathCacheAlloc()
129 ret = strncpy_s(pc->name, len + 1, name, len); in PathCacheAlloc()
131 free(pc); in PathCacheAlloc()
135 pc->parentVnode = parent; in PathCacheAlloc()
136 pc->nameLen = len; in PathCacheAlloc()
137 pc->childVnode = vnode; in PathCacheAlloc()
139 LOS_ListAdd((&(parent->childPathCaches)), (&(pc->childEntry))); in PathCacheAlloc()
140 LOS_ListAdd((&(vnode->parentPathCaches)), (&(pc->parentEntry))); in PathCacheAlloc()
142 PathCacheInsert(parent, pc, name, len); in PathCacheAlloc()
144 return pc; in PathCacheAlloc()
147 int PathCacheFree(struct PathCache *pc) in PathCacheFree() argument
149 if (pc == NULL) { in PathCacheFree()
154 LOS_ListDelete(&pc->hashEntry); in PathCacheFree()
155 LOS_ListDelete(&pc->parentEntry); in PathCacheFree()
156 LOS_ListDelete(&pc->childEntry); in PathCacheFree()
157 free(pc); in PathCacheFree()
164 struct PathCache *pc = NULL; in PathCacheLookup() local
169 LOS_DL_LIST_FOR_EACH_ENTRY(pc, dhead, struct PathCache, hashEntry) { in PathCacheLookup()
170 if (pc->parentVnode == parent && pc->nameLen == len && !strncmp(pc->name, name, len)) { in PathCacheLookup()
171 *vnode = pc->childVnode; in PathCacheLookup()
172 TRACE_HIT_CACHE(pc); in PathCacheLookup()