Lines Matching refs:gid2sid
199 avl_create(&cache->gid2sid.tree, (avl_comp_fn)kidmap_compare_pid, in kidmap_cache_create()
201 mutex_init(&cache->gid2sid.mutex, NULL, MUTEX_DEFAULT, NULL); in kidmap_cache_create()
202 cache->gid2sid.purge_time = 0; in kidmap_cache_create()
203 cache->gid2sid.head.flink = &cache->gid2sid.head; in kidmap_cache_create()
204 cache->gid2sid.head.blink = &cache->gid2sid.head; in kidmap_cache_create()
234 while ((pid2sid = avl_destroy_nodes(&cache->gid2sid.tree, &cookie)) in kidmap_cache_delete()
238 avl_destroy(&cache->gid2sid.tree); in kidmap_cache_delete()
239 mutex_destroy(&cache->gid2sid.mutex); in kidmap_cache_delete()
257 mutex_enter(&cache->gid2sid.mutex); in kidmap_cache_get_data()
258 *sidbygid = avl_numnodes(&cache->gid2sid.tree); in kidmap_cache_get_data()
259 mutex_exit(&cache->gid2sid.mutex); in kidmap_cache_get_data()
303 mutex_enter(&cache->gid2sid.mutex); in kidmap_cache_purge()
305 while ((pid2sid = avl_destroy_nodes(&cache->gid2sid.tree, &cookie)) in kidmap_cache_purge()
309 avl_destroy(&cache->gid2sid.tree); in kidmap_cache_purge()
310 avl_create(&cache->gid2sid.tree, (avl_comp_fn)kidmap_compare_pid, in kidmap_cache_purge()
312 cache->gid2sid.purge_time = 0; in kidmap_cache_purge()
313 cache->gid2sid.head.flink = &cache->gid2sid.head; in kidmap_cache_purge()
314 cache->gid2sid.head.blink = &cache->gid2sid.head; in kidmap_cache_purge()
315 mutex_exit(&cache->gid2sid.mutex); in kidmap_cache_purge()
459 mutex_enter(&cache->gid2sid.mutex); in kidmap_cache_lookup_sidbygid()
461 result = avl_find(&cache->gid2sid.tree, &entry, &where); in kidmap_cache_lookup_sidbygid()
463 list_move(&cache->gid2sid.head, result); in kidmap_cache_lookup_sidbygid()
471 mutex_exit(&cache->gid2sid.mutex); in kidmap_cache_lookup_sidbygid()
625 mutex_enter(&cache->gid2sid.mutex); in kidmap_cache_add_sid2gid()
627 result = avl_find(&cache->gid2sid.tree, &find, &where); in kidmap_cache_add_sid2gid()
639 list_insert(&cache->gid2sid.head, new); in kidmap_cache_add_sid2gid()
640 avl_insert(&cache->gid2sid.tree, new, where); in kidmap_cache_add_sid2gid()
643 if ((avl_numnodes(&cache->gid2sid.tree) > in kidmap_cache_add_sid2gid()
645 (cache->gid2sid.purge_time + CACHE_PURGE_INTERVAL < in kidmap_cache_add_sid2gid()
647 kidmap_purge_pid2sid_cache(&cache->gid2sid, in kidmap_cache_add_sid2gid()
650 mutex_exit(&cache->gid2sid.mutex); in kidmap_cache_add_sid2gid()
760 mutex_enter(&cache->gid2sid.mutex); in kidmap_cache_add_sid2pid()
762 result = avl_find(&cache->gid2sid.tree, &find, &where); in kidmap_cache_add_sid2pid()
774 list_insert(&cache->gid2sid.head, new); in kidmap_cache_add_sid2pid()
775 avl_insert(&cache->gid2sid.tree, new, where); in kidmap_cache_add_sid2pid()
778 if ((avl_numnodes(&cache->gid2sid.tree) > in kidmap_cache_add_sid2pid()
780 (cache->gid2sid.purge_time + in kidmap_cache_add_sid2pid()
782 kidmap_purge_pid2sid_cache(&cache->gid2sid, in kidmap_cache_add_sid2pid()
785 mutex_exit(&cache->gid2sid.mutex); in kidmap_cache_add_sid2pid()