Lines Matching full:np
42 struct drm_gem_name *np);
57 struct drm_gem_name *np; in drm_gem_names_fini() local
62 while ((np = LIST_FIRST(&names->names_hash[i])) != NULL) { in drm_gem_names_fini()
63 drm_gem_names_delete_name(names, np); in drm_gem_names_fini()
149 struct drm_gem_name *np; in drm_gem_name_create() local
155 np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK); in drm_gem_name_create()
157 np->name = alloc_unr(names->unr); in drm_gem_name_create()
158 if (np->name == -1) { in drm_gem_name_create()
160 free(np, M_GEM_NAMES); in drm_gem_name_create()
163 *name = np->name; in drm_gem_name_create()
164 np->ptr = p; in drm_gem_name_create()
165 LIST_INSERT_HEAD(gem_name_hash_index(names, np->name), np, link); in drm_gem_name_create()
171 drm_gem_names_delete_name(struct drm_gem_names *names, struct drm_gem_name *np) in drm_gem_names_delete_name() argument
175 LIST_REMOVE(np, link); in drm_gem_names_delete_name()
177 free_unr(names->unr, np->name); in drm_gem_names_delete_name()
178 free(np, M_GEM_NAMES); in drm_gem_names_delete_name()
203 struct drm_gem_name *np; in drm_gem_names_foreach() local
211 for (np = LIST_FIRST(&names->names_hash[i]); np != NULL; ) { in drm_gem_names_foreach()
212 if (np->name == -1) { in drm_gem_names_foreach()
213 np = LIST_NEXT(np, link); in drm_gem_names_foreach()
216 LIST_INSERT_AFTER(np, &marker, link); in drm_gem_names_foreach()
218 fres = f(np->name, np->ptr, arg); in drm_gem_names_foreach()
220 np = LIST_NEXT(&marker, link); in drm_gem_names_foreach()