Ejemplo n.º 1
0
struct variant *variant_search(tupid_t dt)
{
	struct tupid_tree *tt;

	tt = tupid_tree_search(&variant_dt_root, dt);
	if(!tt)
		return NULL;
	return container_of(tt, struct variant, dtnode);
}
Ejemplo n.º 2
0
struct dircache *dircache_lookup_dt(struct dircache_root *droot, tupid_t dt)
{
	struct tupid_tree *tnode;

	tnode = tupid_tree_search(&droot->dt_root, dt);
	if(!tnode)
		return NULL;
	return container_of(tnode, struct dircache, dt_node);
}
Ejemplo n.º 3
0
struct dircache *dircache_lookup_wd(struct dircache_root *droot, int wd)
{
	struct tupid_tree *tnode;

	tnode = tupid_tree_search(&droot->wd_root, wd);
	if(!tnode)
		return NULL;
	return container_of(tnode, struct dircache, wd_node);
}
Ejemplo n.º 4
0
void tupid_tree_remove(struct tupid_entries *root, tupid_t tupid)
{
	struct tupid_tree *tt;

	tt = tupid_tree_search(root, tupid);
	if(!tt) {
		return;
	}
	tupid_tree_rm(root, tt);
	free(tt);
}
Ejemplo n.º 5
0
void tree_entry_remove(struct tupid_entries *root, tupid_t tupid, int *count)
{
	struct tree_entry *te;
	struct tupid_tree *tt;

	tt = tupid_tree_search(root, tupid);
	if(!tt)
		return;
	tupid_tree_rm(root, tt);
	te = container_of(tt, struct tree_entry, tnode);
	if(count)
		(*count)--;
	free(te);
}