Home
last modified time | relevance | path

Searched refs:tail (Results 1 – 25 of 102) sorted by relevance

12345

/linux-4.19.296/lib/
Dlist_sort.c22 struct list_head head, *tail = &head; in merge() local
27 tail->next = a; in merge()
30 tail->next = b; in merge()
33 tail = tail->next; in merge()
35 tail->next = a?:b; in merge()
52 struct list_head *tail = head; in merge_and_restore_back_links() local
58 tail->next = a; in merge_and_restore_back_links()
59 a->prev = tail; in merge_and_restore_back_links()
62 tail->next = b; in merge_and_restore_back_links()
63 b->prev = tail; in merge_and_restore_back_links()
[all …]
/linux-4.19.296/include/linux/
Dcirc_buf.h12 int tail; member
16 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) argument
21 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) argument
26 #define CIRC_CNT_TO_END(head,tail,size) \ argument
27 ({int end = (size) - (tail); \
32 #define CIRC_SPACE_TO_END(head,tail,size) \ argument
34 int n = (end + (tail)) & ((size)-1); \
Dosq_lock.h20 atomic_t tail; member
30 atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); in osq_lock_init()
38 return atomic_read(&lock->tail) != OSQ_UNLOCKED_VAL; in osq_is_locked()
Dbio.h619 struct bio *tail; member
629 bl->head = bl->tail = NULL; in bio_list_init()
652 if (bl->tail) in bio_list_add()
653 bl->tail->bi_next = bio; in bio_list_add()
657 bl->tail = bio; in bio_list_add()
666 if (!bl->tail) in bio_list_add_head()
667 bl->tail = bio; in bio_list_add_head()
675 if (bl->tail) in bio_list_merge()
676 bl->tail->bi_next = bl2->head; in bio_list_merge()
680 bl->tail = bl2->tail; in bio_list_merge()
[all …]
Drcu_segcblist.h33 struct rcu_head **tail; member
38 #define RCU_CBLIST_INITIALIZER(n) { .head = NULL, .tail = &n.head }
Dvmw_vmci_defs.h869 u64 tail; in vmci_q_header_free_space() local
873 tail = vmci_q_header_producer_tail(produce_q_header); in vmci_q_header_free_space()
876 if (tail >= produce_q_size || head >= produce_q_size) in vmci_q_header_free_space()
884 if (tail >= head) in vmci_q_header_free_space()
885 free_space = produce_q_size - (tail - head) - 1; in vmci_q_header_free_space()
887 free_space = head - tail - 1; in vmci_q_header_free_space()
/linux-4.19.296/include/drm/
Dspsc_queue.h43 atomic_long_t tail; member
51 atomic_long_set(&queue->tail, (long)&queue->head); in spsc_queue_init()
67 struct spsc_node **tail; in spsc_queue_push() local
73 tail = (struct spsc_node **)atomic_long_xchg(&queue->tail, (long)&node->next); in spsc_queue_push()
74 WRITE_ONCE(*tail, node); in spsc_queue_push()
85 return tail == &queue->head; in spsc_queue_push()
107 if (atomic_long_cmpxchg(&queue->tail, in spsc_queue_pop()
/linux-4.19.296/fs/9p/
Dvfs_dir.c56 int tail; member
123 if (rdir->tail == rdir->head) { in v9fs_dir_readdir()
135 rdir->tail = n; in v9fs_dir_readdir()
137 while (rdir->head < rdir->tail) { in v9fs_dir_readdir()
139 rdir->tail - rdir->head, &st); in v9fs_dir_readdir()
181 if (rdir->tail == rdir->head) { in v9fs_dir_readdir_dotl()
188 rdir->tail = err; in v9fs_dir_readdir_dotl()
191 while (rdir->head < rdir->tail) { in v9fs_dir_readdir_dotl()
194 rdir->tail - rdir->head, in v9fs_dir_readdir_dotl()
/linux-4.19.296/fs/affs/
Dinode.c22 struct affs_tail *tail; in affs_iget() local
50 tail = AFFS_TAIL(sb, bh); in affs_iget()
51 prot = be32_to_cpu(tail->protect); in affs_iget()
76 id = be16_to_cpu(tail->uid); in affs_iget()
84 id = be16_to_cpu(tail->gid); in affs_iget()
92 switch (be32_to_cpu(tail->stype)) { in affs_iget()
98 if (be32_to_cpu(tail->stype) == ST_USERDIR || in affs_iget()
127 size = be32_to_cpu(tail->size); in affs_iget()
136 if (tail->link_chain) in affs_iget()
153 = (be32_to_cpu(tail->change.days) * (24 * 60 * 60) + in affs_iget()
[all …]
/linux-4.19.296/drivers/s390/block/
Ddasd_eer.c92 int tail; member
106 if (eerb->head < eerb->tail) in dasd_eer_get_free_bytes()
107 return eerb->tail - eerb->head - 1; in dasd_eer_get_free_bytes()
108 return eerb->buffersize - eerb->head + eerb->tail -1; in dasd_eer_get_free_bytes()
118 if (eerb->head >= eerb->tail) in dasd_eer_get_filled_bytes()
119 return eerb->head - eerb->tail; in dasd_eer_get_filled_bytes()
120 return eerb->buffersize - eerb->tail + eerb->head; in dasd_eer_get_filled_bytes()
167 tailindex = eerb->tail / PAGE_SIZE; in dasd_eer_read_buffer()
168 localtail = eerb->tail % PAGE_SIZE; in dasd_eer_read_buffer()
173 eerb->tail += len; in dasd_eer_read_buffer()
[all …]
/linux-4.19.296/drivers/of/
Dpdt.c135 struct property *head, *tail; in of_pdt_build_prop_list() local
137 head = tail = of_pdt_build_one_prop(node, NULL, in of_pdt_build_prop_list()
140 tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0); in of_pdt_build_prop_list()
141 tail = tail->next; in of_pdt_build_prop_list()
142 while(tail) { in of_pdt_build_prop_list()
143 tail->next = of_pdt_build_one_prop(node, tail->name, in of_pdt_build_prop_list()
145 tail = tail->next; in of_pdt_build_prop_list()
/linux-4.19.296/drivers/isdn/gigaset/
Dser-gigaset.c664 unsigned tail, head, n; in gigaset_tty_receive() local
676 tail = inbuf->tail; in gigaset_tty_receive()
679 head, tail, count); in gigaset_tty_receive()
681 if (head <= tail) { in gigaset_tty_receive()
683 n = min_t(unsigned, count, RBUFSIZE - tail); in gigaset_tty_receive()
684 memcpy(inbuf->data + tail, buf, n); in gigaset_tty_receive()
685 tail = (tail + n) % RBUFSIZE; in gigaset_tty_receive()
692 n = head - tail - 1; in gigaset_tty_receive()
699 memcpy(inbuf->data + tail, buf, count); in gigaset_tty_receive()
700 tail += count; in gigaset_tty_receive()
[all …]
Dcommon.c299 unsigned head, tail; in clear_events() local
305 tail = cs->ev_tail; in clear_events()
307 while (tail != head) { in clear_events()
313 cs->ev_head = tail; in clear_events()
337 unsigned next, tail; in gigaset_add_event() local
344 tail = cs->ev_tail; in gigaset_add_event()
345 next = (tail + 1) % MAX_EVENTS; in gigaset_add_event()
349 event = cs->events + tail; in gigaset_add_event()
553 inbuf->tail = 0; in gigaset_inbuf_init()
569 unsigned n, head, tail, bytesleft; in gigaset_fill_inbuf() local
[all …]
/linux-4.19.296/crypto/
Dmorus640.c229 union morus640_block_in tail; in crypto_morus640_encrypt_chunk() local
231 memcpy(tail.bytes, src, size); in crypto_morus640_encrypt_chunk()
232 memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size); in crypto_morus640_encrypt_chunk()
234 crypto_morus640_load_a(&m, tail.bytes); in crypto_morus640_encrypt_chunk()
237 crypto_morus640_store_a(tail.bytes, &c); in crypto_morus640_encrypt_chunk()
240 memcpy(dst, tail.bytes, size); in crypto_morus640_encrypt_chunk()
274 union morus640_block_in tail; in crypto_morus640_decrypt_chunk() local
276 memcpy(tail.bytes, src, size); in crypto_morus640_decrypt_chunk()
277 memset(tail.bytes + size, 0, MORUS640_BLOCK_SIZE - size); in crypto_morus640_decrypt_chunk()
279 crypto_morus640_load_a(&m, tail.bytes); in crypto_morus640_decrypt_chunk()
[all …]
Dmorus1280.c224 union morus1280_block_in tail; in crypto_morus1280_encrypt_chunk() local
226 memcpy(tail.bytes, src, size); in crypto_morus1280_encrypt_chunk()
227 memset(tail.bytes + size, 0, MORUS1280_BLOCK_SIZE - size); in crypto_morus1280_encrypt_chunk()
229 crypto_morus1280_load_a(&m, tail.bytes); in crypto_morus1280_encrypt_chunk()
232 crypto_morus1280_store_a(tail.bytes, &c); in crypto_morus1280_encrypt_chunk()
235 memcpy(dst, tail.bytes, size); in crypto_morus1280_encrypt_chunk()
270 union morus1280_block_in tail; in crypto_morus1280_decrypt_chunk() local
272 memcpy(tail.bytes, src, size); in crypto_morus1280_decrypt_chunk()
273 memset(tail.bytes + size, 0, MORUS1280_BLOCK_SIZE - size); in crypto_morus1280_decrypt_chunk()
275 crypto_morus1280_load_a(&m, tail.bytes); in crypto_morus1280_decrypt_chunk()
[all …]
Dauthencesn.c45 char tail[]; member
108 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv_tail()
141 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_genicv()
143 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); in crypto_authenc_esn_genicv()
201 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_esn_encrypt()
241 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_esn_decrypt_tail()
244 u8 *ohash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_decrypt_tail()
290 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); in crypto_authenc_esn_decrypt()
293 u8 *ohash = PTR_ALIGN((u8 *)areq_ctx->tail, in crypto_authenc_esn_decrypt()
314 goto tail; in crypto_authenc_esn_decrypt()
[all …]
Dauthenc.c42 char tail[]; member
134 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in authenc_geniv_ahash_done()
155 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_genicv()
156 u8 *hash = areq_ctx->tail; in crypto_authenc_genicv()
216 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_encrypt()
252 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_decrypt_tail()
253 struct skcipher_request *skreq = (void *)(areq_ctx->tail + in crypto_authenc_decrypt_tail()
302 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); in crypto_authenc_decrypt()
303 u8 *hash = areq_ctx->tail; in crypto_authenc_decrypt()
/linux-4.19.296/fs/reiserfs/
Dtail_conversion.c214 char *tail; in indirect2direct() local
245 tail = (char *)kmap(page); /* this can schedule */ in indirect2direct()
275 tail = tail + (pos & (PAGE_SIZE - 1)); in indirect2direct()
284 tail ? tail : NULL) < 0) { in indirect2direct()
/linux-4.19.296/drivers/hid/
Dhidraw.c56 if (list->head == list->tail) { in hidraw_read()
60 while (list->head == list->tail) { in hidraw_read()
88 len = list->buffer[list->tail].len > count ? in hidraw_read()
89 count : list->buffer[list->tail].len; in hidraw_read()
91 if (list->buffer[list->tail].value) { in hidraw_read()
92 if (copy_to_user(buffer, list->buffer[list->tail].value, len)) { in hidraw_read()
99 kfree(list->buffer[list->tail].value); in hidraw_read()
100 list->buffer[list->tail].value = NULL; in hidraw_read()
101 list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1); in hidraw_read()
263 if (list->head != list->tail) in hidraw_poll()
[all …]
/linux-4.19.296/drivers/thunderbolt/
Dnhi.c179 return ((ring->head + 1) % ring->size) == ring->tail; in ring_full()
184 return ring->head == ring->tail; in ring_empty()
245 if (!(ring->descriptors[ring->tail].flags in ring_work()
252 frame->size = ring->descriptors[ring->tail].length; in ring_work()
253 frame->eof = ring->descriptors[ring->tail].eof; in ring_work()
254 frame->sof = ring->descriptors[ring->tail].sof; in ring_work()
255 frame->flags = ring->descriptors[ring->tail].flags; in ring_work()
257 ring->tail = (ring->tail + 1) % ring->size; in ring_work()
313 if (ring->descriptors[ring->tail].flags & RING_DESC_COMPLETED) { in tb_ring_poll()
319 frame->size = ring->descriptors[ring->tail].length; in tb_ring_poll()
[all …]
/linux-4.19.296/fs/
Daio.c62 unsigned tail; member
153 unsigned tail; member
548 ring->head = ring->tail = 0; in aio_setup_ring()
959 unsigned tail) in refill_reqs_available() argument
965 if (head <= tail) in refill_reqs_available()
966 events_in_ring = tail - head; in refill_reqs_available()
968 events_in_ring = ctx->nr_events - (head - tail); in refill_reqs_available()
1007 refill_reqs_available(ctx, head, ctx->tail); in user_refill_reqs_available()
1088 unsigned tail, pos, head; in aio_complete() local
1098 tail = ctx->tail; in aio_complete()
[all …]
/linux-4.19.296/drivers/misc/mic/scif/
Dscif_rb.c25 #define scif_rb_ring_cnt(head, tail, size) CIRC_CNT(head, tail, size) argument
26 #define scif_rb_ring_space(head, tail, size) CIRC_SPACE(head, tail, size) argument
/linux-4.19.296/include/asm-generic/
Dqspinlock_types.h47 u16 tail; member
51 u16 tail; member
/linux-4.19.296/drivers/ptp/
Dptp_private.h38 int tail; member
73 int cnt = q->tail - q->head; in queue_cnt()
/linux-4.19.296/drivers/hid/usbhid/
Dhiddev.c54 int tail; member
351 if (list->head == list->tail) { in hiddev_read()
354 while (list->head == list->tail) { in hiddev_read()
387 while (list->head != list->tail && in hiddev_read()
390 if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE) { in hiddev_read()
393 event.hid = list->buffer[list->tail].usage_code; in hiddev_read()
394 event.value = list->buffer[list->tail].value; in hiddev_read()
402 if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE || in hiddev_read()
405 … if (copy_to_user(buffer + retval, list->buffer + list->tail, sizeof(struct hiddev_usage_ref))) { in hiddev_read()
412 list->tail = (list->tail + 1) & (HIDDEV_BUFFER_SIZE - 1); in hiddev_read()
[all …]

12345