| /tools/include/linux/ |
| A D | list.h | 63 __list_add(new, head, head->next); in list_add() 77 __list_add(new, head->prev, head); in list_add_tail() 189 return head->next == head; in list_empty() 208 return (next == head) && (next == head->prev); in list_empty_careful() 231 return !list_empty(head) && (head->next == head->prev); in list_is_singular() 266 (head->next != entry && head != entry)) in list_cut_position() 297 __list_splice(list, head, head->next); in list_splice() 309 __list_splice(list, head->prev, head); in list_splice_tail() 323 __list_splice(list, head, head->next); in list_splice_init() 340 __list_splice(list, head->prev, head); in list_splice_tail_init() [all …]
|
| /tools/testing/selftests/arm64/signal/testcases/ |
| A D | testcases.c | 135 switch (head->magic) { in validate_reserved() 137 if (head->size) { in validate_reserved() 141 head = extra_data; in validate_reserved() 155 else if (head->size != in validate_reserved() 196 else if (head->size != in validate_reserved() 241 head->magic, in validate_reserved() 249 offs += head->size; in validate_reserved() 271 head = GET_RESV_NEXT_HEAD(head); in validate_reserved() 314 if (!head) in get_starting_head() 315 return head; in get_starting_head() [all …]
|
| A D | fake_sigreturn_bad_size.c | 24 struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head; in fake_sigreturn_bad_size_run() local 33 head = get_starting_head(shead, need_sz, resv_sz, &offset); in fake_sigreturn_bad_size_run() 34 if (!head) in fake_sigreturn_bad_size_run() 45 head->magic = ESR_MAGIC; in fake_sigreturn_bad_size_run() 46 head->size = sizeof(struct esr_context); in fake_sigreturn_bad_size_run() 48 write_terminator_record(GET_RESV_NEXT_HEAD(head)); in fake_sigreturn_bad_size_run() 60 head->size = (resv_sz - offset - need_sz + MIN_SZ_ALIGN) & ~0xfUL; in fake_sigreturn_bad_size_run() 62 head->size += MIN_SZ_ALIGN; in fake_sigreturn_bad_size_run() 64 write_terminator_record(GET_RESV_NEXT_HEAD(head)); in fake_sigreturn_bad_size_run()
|
| A D | testcases.h | 95 static inline struct _aarch64_ctx *get_header(struct _aarch64_ctx *head, uint32_t magic, in get_header() argument 101 if (!head || resv_sz < HDR_SZ) in get_header() 105 head->magic != magic && head->magic) { in get_header() 106 offs += head->size; in get_header() 107 head = GET_RESV_NEXT_HEAD(head); in get_header() 109 if (head->magic == magic) { in get_header() 110 found = head; in get_header() 119 static inline struct _aarch64_ctx *get_terminator(struct _aarch64_ctx *head, in get_terminator() argument 123 return get_header(head, 0, resv_sz, offset); in get_terminator()
|
| A D | fake_sigreturn_bad_magic.c | 21 struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head; in fake_sigreturn_bad_magic_run() local 28 head = get_starting_head(shead, HDR_SZ * 2, GET_SF_RESV_SIZE(sf), NULL); in fake_sigreturn_bad_magic_run() 29 if (!head) in fake_sigreturn_bad_magic_run() 36 head->magic = KSFT_BAD_MAGIC; in fake_sigreturn_bad_magic_run() 37 head->size = HDR_SZ; in fake_sigreturn_bad_magic_run() 38 write_terminator_record(GET_RESV_NEXT_HEAD(head)); in fake_sigreturn_bad_magic_run()
|
| A D | fake_sigreturn_duplicated_fpsimd.c | 21 struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head; in fake_sigreturn_duplicated_fpsimd_run() local 27 head = get_starting_head(shead, sizeof(struct fpsimd_context) + HDR_SZ, in fake_sigreturn_duplicated_fpsimd_run() 29 if (!head) in fake_sigreturn_duplicated_fpsimd_run() 33 head->magic = FPSIMD_MAGIC; in fake_sigreturn_duplicated_fpsimd_run() 34 head->size = sizeof(struct fpsimd_context); in fake_sigreturn_duplicated_fpsimd_run() 36 write_terminator_record(GET_RESV_NEXT_HEAD(head)); in fake_sigreturn_duplicated_fpsimd_run()
|
| A D | za_no_regs.c | 40 struct _aarch64_ctx *head = GET_BUF_RESV_HEAD(context); in do_one_sme_vl() local 57 head = get_header(head, ZA_MAGIC, GET_BUF_RESV_SIZE(context), &offset); in do_one_sme_vl() 58 if (!head) { in do_one_sme_vl() 63 za = (struct za_context *)head; in do_one_sme_vl() 69 if (head->size != ZA_SIG_REGS_OFFSET) { in do_one_sme_vl() 71 head->size, ZA_SIG_REGS_OFFSET); in do_one_sme_vl() 77 head->size, za->vl); in do_one_sme_vl()
|
| A D | za_regs.c | 48 struct _aarch64_ctx *head = GET_BUF_RESV_HEAD(context); in do_one_sme_vl() local 66 head = get_header(head, ZA_MAGIC, GET_BUF_RESV_SIZE(context), &offset); in do_one_sme_vl() 67 if (!head) { in do_one_sme_vl() 72 za = (struct za_context *)head; in do_one_sme_vl() 78 if (head->size != ZA_SIG_CONTEXT_SIZE(sve_vq_from_vl(vl))) { in do_one_sme_vl() 80 head->size, ZA_SIG_CONTEXT_SIZE(sve_vq_from_vl(vl))); in do_one_sme_vl() 85 head->size, za->vl); in do_one_sme_vl()
|
| A D | fake_sigreturn_bad_size_for_magic0.c | 21 struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head; in fake_sigreturn_bad_size_for_magic0_run() local 28 head = get_starting_head(shead, HDR_SZ, GET_SF_RESV_SIZE(sf), NULL); in fake_sigreturn_bad_size_for_magic0_run() 29 if (!head) in fake_sigreturn_bad_size_for_magic0_run() 32 head->magic = 0; in fake_sigreturn_bad_size_for_magic0_run() 33 head->size = HDR_SZ; in fake_sigreturn_bad_size_for_magic0_run()
|
| A D | fake_sigreturn_sme_change_vl.c | 37 struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); in fake_sigreturn_ssve_change_vl() local 45 head = get_header(head, ZA_MAGIC, resv_sz, &offset); in fake_sigreturn_ssve_change_vl() 46 if (!head) { in fake_sigreturn_ssve_change_vl() 51 if (head->size != sizeof(struct za_context)) { in fake_sigreturn_ssve_change_vl() 56 za = (struct za_context *)head; in fake_sigreturn_ssve_change_vl()
|
| A D | fake_sigreturn_sve_change_vl.c | 37 struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); in fake_sigreturn_sve_change_vl() local 45 head = get_header(head, SVE_MAGIC, resv_sz, &offset); in fake_sigreturn_sve_change_vl() 46 if (!head) { in fake_sigreturn_sve_change_vl() 51 if (head->size != sizeof(struct sve_context)) { in fake_sigreturn_sve_change_vl() 56 sve = (struct sve_context *)head; in fake_sigreturn_sve_change_vl()
|
| A D | zt_regs.c | 30 struct _aarch64_ctx *head = GET_BUF_RESV_HEAD(context); in zt_regs_run() local 42 head = get_header(head, ZT_MAGIC, GET_BUF_RESV_SIZE(context), &offset); in zt_regs_run() 43 if (!head) { in zt_regs_run() 48 zt = (struct zt_context *)head; in zt_regs_run() 55 head->size, zt->nregs); in zt_regs_run()
|
| A D | fake_sigreturn_missing_fpsimd.c | 23 struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); in fake_sigreturn_missing_fpsimd_run() local 30 head = get_header(head, FPSIMD_MAGIC, resv_sz, &offset); in fake_sigreturn_missing_fpsimd_run() 31 if (head && resv_sz - offset >= HDR_SZ) { in fake_sigreturn_missing_fpsimd_run() 35 write_terminator_record(head); in fake_sigreturn_missing_fpsimd_run()
|
| A D | sve_regs.c | 46 struct _aarch64_ctx *head = GET_BUF_RESV_HEAD(context); in do_one_sve_vl() local 64 head = get_header(head, SVE_MAGIC, GET_BUF_RESV_SIZE(context), in do_one_sve_vl() 66 if (!head) { in do_one_sve_vl() 71 sve = (struct sve_context *)head; in do_one_sve_vl() 79 head->size, sve->vl); in do_one_sve_vl()
|
| A D | sme_vl.c | 33 struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); in sme_vl() local 41 head = get_header(head, ZA_MAGIC, resv_sz, &offset); in sme_vl() 42 if (!head) { in sme_vl() 46 za = (struct za_context *)head; in sme_vl()
|
| A D | sve_vl.c | 33 struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf); in sve_vl() local 41 head = get_header(head, SVE_MAGIC, resv_sz, &offset); in sve_vl() 42 if (!head) { in sve_vl() 46 sve = (struct sve_context *)head; in sve_vl()
|
| /tools/virtio/ringtest/ |
| A D | virtio_ring_0_9.c | 101 unsigned head; in add_inbuf() local 113 head = guest.free_head; in add_inbuf() 120 desc[head].len = len; in add_inbuf() 130 data[head].data = datap; in add_inbuf() 143 ring.avail->ring[avail] = head; in add_inbuf() 154 unsigned head; in get_buf() local 173 index = head; in get_buf() 260 unsigned head = host.used_idx; in avail_empty() local 274 unsigned head; in use_buf() local 294 head = used_idx; in use_buf() [all …]
|
| A D | ring.c | 114 unsigned head, index; in add_inbuf() local 126 ring[head].len = len; in add_inbuf() 133 index = ring[head].index; in add_inbuf() 138 ring[head].flags = DESC_HW; in add_inbuf() 149 if (ring[head].flags & DESC_HW) in get_buf() 153 *lenp = ring[head].len; in get_buf() 168 return (ring[head].flags & DESC_HW); in used_empty() 223 return !(ring[head].flags & DESC_HW); in avail_empty() 230 if (!(ring[head].flags & DESC_HW)) in use_buf() 241 ring[head].len--; in use_buf() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | linked_list.c | 38 n = bpf_list_pop_front(head); in list_push_pop() 47 n = bpf_list_pop_back(head); in list_push_pop() 63 n = bpf_list_pop_back(head); in list_push_pop() 78 n = bpf_list_pop_front(head); in list_push_pop() 90 n = bpf_list_pop_front(head); in list_push_pop() 98 n = bpf_list_pop_back(head); in list_push_pop() 142 n = bpf_list_pop_front(head); in list_push_pop_multiple() 161 n = bpf_list_pop_back(head); in list_push_pop_multiple() 173 n = bpf_list_pop_back(head); in list_push_pop_multiple() 181 n = bpf_list_pop_front(head); in list_push_pop_multiple() [all …]
|
| A D | linked_list_fail.c | 57 CHECK(kptr, pop_front, &f->head); 58 CHECK(kptr, pop_back, &f->head); 63 CHECK(map, pop_front, &v->head); 64 CHECK(map, pop_back, &v->head); 66 CHECK(inner_map, pop_front, &iv->head); 67 CHECK(inner_map, pop_back, &iv->head); 81 CHECK(kptr, push_back, &f->head, &b->node); 318 return *(int *)&f->head; in direct_read_head() 329 *(int *)&f->head = 0; in direct_write_head() 579 int pop_ptr_off(void *(*op)(void *head)) in pop_ptr_off() argument [all …]
|
| A D | mptcp_bpf.h | 9 const struct list_head *head) in list_is_head() argument 11 return list == head; in list_is_head() 23 #define list_entry_is_head(pos, head, member) \ argument 24 list_is_head(&pos->member, (head)) 27 #define list_for_each_entry(pos, head, member) \ argument 28 for (pos = list_first_entry(head, typeof(*pos), member); \ 29 !list_entry_is_head(pos, head, member) && can_loop; \
|
| /tools/testing/selftests/bpf/ |
| A D | bpf_arena_htab.h | 9 struct arena_list_head head; member 29 return &__select_bucket(htab, hash)->head; in select_bucket() 40 static hashtab_elem_t *lookup_elem_raw(arena_list_head_t *head, __u32 hash, int key) in lookup_elem_raw() argument 44 list_for_each_entry(l, head, hash_node) in lookup_elem_raw() 59 arena_list_head_t *head; in htab_lookup_elem() local 62 head = select_bucket(htab, key); in htab_lookup_elem() 63 l_old = lookup_elem_raw(head, htab_hash(key), key); in htab_lookup_elem() 72 arena_list_head_t *head; in htab_update_elem() local 75 head = select_bucket(htab, key); in htab_update_elem() 76 l_old = lookup_elem_raw(head, htab_hash(key), key); in htab_update_elem() [all …]
|
| /tools/lib/ |
| A D | list_sort.c | 16 struct list_head *head, **tail = &head; in merge() local 38 return head; in merge() 49 static void merge_final(void *priv, list_cmp_func_t cmp, struct list_head *head, in merge_final() argument 52 struct list_head *tail = head; in merge_final() 84 tail->next = head; in merge_final() 85 head->prev = tail; in merge_final() 172 void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp) in list_sort() argument 174 struct list_head *list = head->next, *pending = NULL; in list_sort() 177 if (list == head->prev) /* Zero or one elements */ in list_sort() 181 head->prev->next = NULL; in list_sort() [all …]
|
| /tools/usb/usbip/libsrc/ |
| A D | list.h | 58 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument 60 __list_add(new, head, head->next); in list_add() 111 #define list_for_each(pos, head) \ argument 112 for (pos = (head)->next; pos != (head); pos = pos->next) 120 #define list_for_each_safe(pos, n, head) \ argument 121 for (pos = (head)->next, n = pos->next; pos != (head); \
|
| /tools/testing/shared/linux/ |
| A D | radix-tree.h | 10 static inline void trace_call_rcu(struct rcu_head *head, in trace_call_rcu() argument 11 void (*func)(struct rcu_head *head)) in trace_call_rcu() argument 14 printf("Delaying free of %p to slab\n", (char *)head - in trace_call_rcu() 16 call_rcu(head, func); in trace_call_rcu()
|