Lines Matching refs:uid2sid

192 	avl_create(&cache->uid2sid.tree, (avl_comp_fn)kidmap_compare_pid,  in kidmap_cache_create()
194 mutex_init(&cache->uid2sid.mutex, NULL, MUTEX_DEFAULT, NULL); in kidmap_cache_create()
195 cache->uid2sid.purge_time = 0; in kidmap_cache_create()
196 cache->uid2sid.head.flink = &cache->uid2sid.head; in kidmap_cache_create()
197 cache->uid2sid.head.blink = &cache->uid2sid.head; in kidmap_cache_create()
225 while ((pid2sid = avl_destroy_nodes(&cache->uid2sid.tree, &cookie)) in kidmap_cache_delete()
229 avl_destroy(&cache->uid2sid.tree); in kidmap_cache_delete()
230 mutex_destroy(&cache->uid2sid.mutex); in kidmap_cache_delete()
253 mutex_enter(&cache->uid2sid.mutex); in kidmap_cache_get_data()
254 *sidbyuid = avl_numnodes(&cache->uid2sid.tree); in kidmap_cache_get_data()
255 mutex_exit(&cache->uid2sid.mutex); in kidmap_cache_get_data()
288 mutex_enter(&cache->uid2sid.mutex); in kidmap_cache_purge()
290 while ((pid2sid = avl_destroy_nodes(&cache->uid2sid.tree, &cookie)) in kidmap_cache_purge()
294 avl_destroy(&cache->uid2sid.tree); in kidmap_cache_purge()
295 avl_create(&cache->uid2sid.tree, (avl_comp_fn)kidmap_compare_pid, in kidmap_cache_purge()
297 cache->uid2sid.purge_time = 0; in kidmap_cache_purge()
298 cache->uid2sid.head.flink = &cache->uid2sid.head; in kidmap_cache_purge()
299 cache->uid2sid.head.blink = &cache->uid2sid.head; in kidmap_cache_purge()
300 mutex_exit(&cache->uid2sid.mutex); in kidmap_cache_purge()
429 mutex_enter(&cache->uid2sid.mutex); in kidmap_cache_lookup_sidbyuid()
431 result = avl_find(&cache->uid2sid.tree, &entry, &where); in kidmap_cache_lookup_sidbyuid()
433 list_move(&cache->uid2sid.head, result); in kidmap_cache_lookup_sidbyuid()
441 mutex_exit(&cache->uid2sid.mutex); in kidmap_cache_lookup_sidbyuid()
536 mutex_enter(&cache->uid2sid.mutex); in kidmap_cache_add_sid2uid()
538 result = avl_find(&cache->uid2sid.tree, &find, &where); in kidmap_cache_add_sid2uid()
550 list_insert(&cache->uid2sid.head, new); in kidmap_cache_add_sid2uid()
551 avl_insert(&cache->uid2sid.tree, new, where); in kidmap_cache_add_sid2uid()
554 if ((avl_numnodes(&cache->uid2sid.tree) > in kidmap_cache_add_sid2uid()
556 (cache->uid2sid.purge_time + CACHE_PURGE_INTERVAL < in kidmap_cache_add_sid2uid()
558 kidmap_purge_pid2sid_cache(&cache->uid2sid, in kidmap_cache_add_sid2uid()
561 mutex_exit(&cache->uid2sid.mutex); in kidmap_cache_add_sid2uid()
732 mutex_enter(&cache->uid2sid.mutex); in kidmap_cache_add_sid2pid()
734 result = avl_find(&cache->uid2sid.tree, &find, &where); in kidmap_cache_add_sid2pid()
746 list_insert(&cache->uid2sid.head, new); in kidmap_cache_add_sid2pid()
747 avl_insert(&cache->uid2sid.tree, new, where); in kidmap_cache_add_sid2pid()
750 if ((avl_numnodes(&cache->uid2sid.tree) > in kidmap_cache_add_sid2pid()
752 (cache->uid2sid.purge_time + in kidmap_cache_add_sid2pid()
755 kidmap_purge_pid2sid_cache(&cache->uid2sid, in kidmap_cache_add_sid2pid()
758 mutex_exit(&cache->uid2sid.mutex); in kidmap_cache_add_sid2pid()