Lines Matching refs:key
22 __type(key, int);
30 __type(key, int);
42 __type(key, int);
49 __type(key, int);
56 static int test_elem_callback(void *map, int *key, in test_elem_callback() argument
57 int (callback_fn)(void *map, int *key, void *value)) in test_elem_callback()
62 if ((ok & (1 << *key) || in test_elem_callback()
63 (ok_sleepable & (1 << *key)))) in test_elem_callback()
67 bpf_map_update_elem(map, key, &init, 0)) in test_elem_callback()
70 val = bpf_map_lookup_elem(map, key); in test_elem_callback()
74 val->ok_offset = *key; in test_elem_callback()
89 static int test_hmap_elem_callback(void *map, int *key, in test_hmap_elem_callback() argument
90 int (callback_fn)(void *map, int *key, void *value)) in test_hmap_elem_callback()
95 if ((ok & (1 << *key) || in test_hmap_elem_callback()
96 (ok_sleepable & (1 << *key)))) in test_hmap_elem_callback()
99 if (bpf_map_update_elem(map, key, &init, 0)) in test_hmap_elem_callback()
102 val = bpf_map_lookup_elem(map, key); in test_hmap_elem_callback()
120 static int wq_callback(void *map, int *key, void *value) in wq_callback() argument
123 ok |= (1 << *key); in wq_callback()
128 static int wq_cb_sleepable(void *map, int *key, void *value) in wq_cb_sleepable() argument
133 if (*key != offset) in wq_cb_sleepable()
146 int key = 0; in test_call_array_sleepable() local
148 return test_elem_callback(&array, &key, wq_cb_sleepable); in test_call_array_sleepable()
156 int key = 1; in test_syscall_array_sleepable() local
158 return test_elem_callback(&array, &key, wq_cb_sleepable); in test_syscall_array_sleepable()
166 int key = 2; in test_call_hash_sleepable() local
168 return test_hmap_elem_callback(&hmap, &key, wq_callback); in test_call_hash_sleepable()
176 int key = 3; in test_call_hash_malloc_sleepable() local
178 return test_hmap_elem_callback(&hmap_malloc, &key, wq_callback); in test_call_hash_malloc_sleepable()
186 int key = 4; in test_call_lru_sleepable() local
188 return test_elem_callback(&lru, &key, wq_callback); in test_call_lru_sleepable()