Lines Matching defs:klist
2 * klist.c - Routines for manipulating klists.
8 * This klist interface provides a couple of structures that wrap around
9 * struct list_head to provide explicit list "head" (struct klist) and list
10 * "node" (struct klist_node) objects. For struct klist, a spinlock is
12 * klist_node provides a pointer to the klist that owns it and a kref
24 * Internally, that routine takes the klist's lock, decrements the
28 * There are primitives for adding and removing nodes to/from a klist.
37 #include <linux/klist.h>
48 static struct klist *knode_klist(struct klist_node *knode)
50 return (struct klist *)
59 static void knode_set_klist(struct klist_node *knode, struct klist *klist)
61 knode->n_klist = klist;
74 * klist_init - Initialize a klist structure.
75 * @k: The klist we're initializing.
79 * Initialises the klist structure. If the klist_node structures are
85 void klist_init(struct klist *k, void (*get)(struct klist_node *),
95 static void add_head(struct klist *k, struct klist_node *n)
102 static void add_tail(struct klist *k, struct klist_node *n)
109 static void klist_node_init(struct klist *k, struct klist_node *n)
121 * @k: klist it's going on.
123 void klist_add_head(struct klist_node *n, struct klist *k)
133 * @k: klist it's going on.
135 void klist_add_tail(struct klist_node *n, struct klist *k)
149 struct klist *k = knode_klist(pos);
165 struct klist *k = knode_klist(pos);
212 struct klist *k = knode_klist(n);
274 * @k: klist we're iterating.
281 void klist_iter_init_node(struct klist *k, struct klist_iter *i,
293 * @k: klist we're iterating.
298 void klist_iter_init(struct klist *k, struct klist_iter *i)