Lines Matching refs:f
31 struct foo *f; in list_push_pop() local
33 f = bpf_obj_new(typeof(*f)); in list_push_pop()
34 if (!f) in list_push_pop()
42 bpf_obj_drop(f); in list_push_pop()
51 bpf_obj_drop(f); in list_push_pop()
57 f->data = 42; in list_push_pop()
58 bpf_list_push_front(head, &f->node2); in list_push_pop()
67 f = container_of(n, struct foo, node2); in list_push_pop()
68 if (f->data != 42) { in list_push_pop()
69 bpf_obj_drop(f); in list_push_pop()
74 f->data = 13; in list_push_pop()
75 bpf_list_push_front(head, &f->node2); in list_push_pop()
82 f = container_of(n, struct foo, node2); in list_push_pop()
83 if (f->data != 13) { in list_push_pop()
84 bpf_obj_drop(f); in list_push_pop()
87 bpf_obj_drop(f); in list_push_pop()
112 struct foo *f[200], *pf; in list_push_pop_multiple() local
118 if (ARRAY_SIZE(f) % 2) in list_push_pop_multiple()
121 for (i = 0; i < ARRAY_SIZE(f); i += 2) { in list_push_pop_multiple()
122 f[i] = bpf_obj_new(typeof(**f)); in list_push_pop_multiple()
123 if (!f[i]) in list_push_pop_multiple()
125 f[i]->data = i; in list_push_pop_multiple()
127 f[i + 1] = bpf_obj_new(typeof(**f)); in list_push_pop_multiple()
128 if (!f[i + 1]) { in list_push_pop_multiple()
129 bpf_obj_drop(f[i]); in list_push_pop_multiple()
132 f[i + 1]->data = i + 1; in list_push_pop_multiple()
135 bpf_list_push_front(head, &f[i]->node2); in list_push_pop_multiple()
136 bpf_list_push_front(head, &f[i + 1]->node2); in list_push_pop_multiple()
140 for (i = 0; i < ARRAY_SIZE(f); i++) { in list_push_pop_multiple()
147 if (pf->data != (ARRAY_SIZE(f) - i - 1)) { in list_push_pop_multiple()
159 for (i = 0; i < ARRAY_SIZE(f); i++) { in list_push_pop_multiple()
195 struct foo *f; in list_in_list() local
198 f = bpf_obj_new(typeof(*f)); in list_in_list()
199 if (!f) in list_in_list()
204 bpf_obj_drop(f); in list_in_list()
208 bpf_spin_lock(&f->lock); in list_in_list()
209 bpf_list_push_back(&f->head, &b->node); in list_in_list()
210 bpf_spin_unlock(&f->lock); in list_in_list()
214 f->data = 42; in list_in_list()
215 bpf_list_push_front(head, &f->node2); in list_in_list()
226 f = container_of(n, struct foo, node2); in list_in_list()
227 if (f->data != 42) { in list_in_list()
228 bpf_obj_drop(f); in list_in_list()
233 bpf_spin_lock(&f->lock); in list_in_list()
234 n = bpf_list_pop_front(&f->head); in list_in_list()
235 bpf_spin_unlock(&f->lock); in list_in_list()
237 bpf_obj_drop(f); in list_in_list()
242 bpf_obj_drop(f); in list_in_list()
248 bpf_spin_lock(&f->lock); in list_in_list()
249 n = bpf_list_pop_front(&f->head); in list_in_list()
250 bpf_spin_unlock(&f->lock); in list_in_list()
252 bpf_obj_drop(f); in list_in_list()
256 bpf_obj_drop(f); in list_in_list()