Lines Matching refs:sid2pid

182 	avl_create(&cache->sid2pid.tree, (avl_comp_fn)kidmap_compare_sid,  in kidmap_cache_create()
184 mutex_init(&cache->sid2pid.mutex, NULL, MUTEX_DEFAULT, NULL); in kidmap_cache_create()
185 cache->sid2pid.purge_time = 0; in kidmap_cache_create()
186 cache->sid2pid.head.flink = &cache->sid2pid.head; in kidmap_cache_create()
187 cache->sid2pid.head.blink = &cache->sid2pid.head; in kidmap_cache_create()
188 cache->sid2pid.uid_num = 0; in kidmap_cache_create()
189 cache->sid2pid.gid_num = 0; in kidmap_cache_create()
190 cache->sid2pid.pid_num = 0; in kidmap_cache_create()
211 sid2pid_t *sid2pid; in kidmap_cache_delete() local
216 while ((sid2pid = avl_destroy_nodes(&cache->sid2pid.tree, &cookie)) in kidmap_cache_delete()
218 kmem_free(sid2pid, sizeof (sid2pid_t)); in kidmap_cache_delete()
220 avl_destroy(&cache->sid2pid.tree); in kidmap_cache_delete()
221 mutex_destroy(&cache->sid2pid.mutex); in kidmap_cache_delete()
247 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_get_data()
248 *uidbysid = cache->sid2pid.uid_num; in kidmap_cache_get_data()
249 *gidbysid = cache->sid2pid.gid_num; in kidmap_cache_get_data()
250 *pidbysid = cache->sid2pid.pid_num; in kidmap_cache_get_data()
251 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_get_data()
266 sid2pid_t *sid2pid; in kidmap_cache_purge() local
270 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_purge()
272 while ((sid2pid = avl_destroy_nodes(&cache->sid2pid.tree, &cookie)) in kidmap_cache_purge()
274 kmem_free(sid2pid, sizeof (sid2pid_t)); in kidmap_cache_purge()
276 avl_destroy(&cache->sid2pid.tree); in kidmap_cache_purge()
277 avl_create(&cache->sid2pid.tree, (avl_comp_fn)kidmap_compare_sid, in kidmap_cache_purge()
279 cache->sid2pid.purge_time = 0; in kidmap_cache_purge()
280 cache->sid2pid.head.flink = &cache->sid2pid.head; in kidmap_cache_purge()
281 cache->sid2pid.head.blink = &cache->sid2pid.head; in kidmap_cache_purge()
282 cache->sid2pid.uid_num = 0; in kidmap_cache_purge()
283 cache->sid2pid.gid_num = 0; in kidmap_cache_purge()
284 cache->sid2pid.pid_num = 0; in kidmap_cache_purge()
285 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_purge()
332 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_lookup_uidbysid()
334 result = avl_find(&cache->sid2pid.tree, &entry, &where); in kidmap_cache_lookup_uidbysid()
336 list_move(&cache->sid2pid.head, result); in kidmap_cache_lookup_uidbysid()
343 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_lookup_uidbysid()
362 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_lookup_gidbysid()
364 result = avl_find(&cache->sid2pid.tree, &entry, &where); in kidmap_cache_lookup_gidbysid()
366 list_move(&cache->sid2pid.head, result); in kidmap_cache_lookup_gidbysid()
373 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_lookup_gidbysid()
392 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_lookup_pidbysid()
394 result = avl_find(&cache->sid2pid.tree, &entry, &where); in kidmap_cache_lookup_pidbysid()
396 list_move(&cache->sid2pid.head, result); in kidmap_cache_lookup_pidbysid()
410 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_lookup_pidbysid()
495 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_add_sid2uid()
497 result = avl_find(&cache->sid2pid.tree, &find, &where); in kidmap_cache_add_sid2uid()
500 cache->sid2pid.uid_num++; in kidmap_cache_add_sid2uid()
512 cache->sid2pid.uid_num++; in kidmap_cache_add_sid2uid()
514 list_insert(&cache->sid2pid.head, new); in kidmap_cache_add_sid2uid()
515 avl_insert(&cache->sid2pid.tree, new, where); in kidmap_cache_add_sid2uid()
518 if ((avl_numnodes(&cache->sid2pid.tree) > in kidmap_cache_add_sid2uid()
520 (cache->sid2pid.purge_time + CACHE_PURGE_INTERVAL < in kidmap_cache_add_sid2uid()
522 kidmap_purge_sid2pid_cache(&cache->sid2pid, in kidmap_cache_add_sid2uid()
525 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_add_sid2uid()
584 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_add_sid2gid()
586 result = avl_find(&cache->sid2pid.tree, &find, &where); in kidmap_cache_add_sid2gid()
589 cache->sid2pid.gid_num++; in kidmap_cache_add_sid2gid()
601 cache->sid2pid.gid_num++; in kidmap_cache_add_sid2gid()
603 list_insert(&cache->sid2pid.head, new); in kidmap_cache_add_sid2gid()
604 avl_insert(&cache->sid2pid.tree, new, where); in kidmap_cache_add_sid2gid()
607 if ((avl_numnodes(&cache->sid2pid.tree) > in kidmap_cache_add_sid2gid()
609 (cache->sid2pid.purge_time + CACHE_PURGE_INTERVAL < in kidmap_cache_add_sid2gid()
611 kidmap_purge_sid2pid_cache(&cache->sid2pid, in kidmap_cache_add_sid2gid()
614 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_add_sid2gid()
672 mutex_enter(&cache->sid2pid.mutex); in kidmap_cache_add_sid2pid()
674 result = avl_find(&cache->sid2pid.tree, &find, &where); in kidmap_cache_add_sid2pid()
677 cache->sid2pid.pid_num++; in kidmap_cache_add_sid2pid()
681 cache->sid2pid.uid_num++; in kidmap_cache_add_sid2pid()
686 cache->sid2pid.gid_num++; in kidmap_cache_add_sid2pid()
700 cache->sid2pid.uid_num++; in kidmap_cache_add_sid2pid()
706 cache->sid2pid.gid_num++; in kidmap_cache_add_sid2pid()
708 cache->sid2pid.pid_num++; in kidmap_cache_add_sid2pid()
710 list_insert(&cache->sid2pid.head, new); in kidmap_cache_add_sid2pid()
711 avl_insert(&cache->sid2pid.tree, new, where); in kidmap_cache_add_sid2pid()
714 if ((avl_numnodes(&cache->sid2pid.tree) > in kidmap_cache_add_sid2pid()
716 (cache->sid2pid.purge_time + CACHE_PURGE_INTERVAL < in kidmap_cache_add_sid2pid()
718 kidmap_purge_sid2pid_cache(&cache->sid2pid, in kidmap_cache_add_sid2pid()
721 mutex_exit(&cache->sid2pid.mutex); in kidmap_cache_add_sid2pid()