Home
last modified time | relevance | path

Searched refs:total_size (Results 1 – 4 of 4) sorted by relevance

/DragonOS-0.1.7/kernel/src/libs/
Dkfifo.c22 fifo->total_size = size; in kfifo_alloc()
40 fifo->total_size = size; in kfifo_init()
54 if (unlikely(fifo->size + size > fifo->total_size)) in kfifo_in()
60 if (fifo->in_offset + size > fifo->total_size) // 发生回环 in kfifo_in()
62 uint32_t tmp = fifo->total_size - fifo->in_offset; in kfifo_in()
94 if (fifo->out_offset + size > fifo->total_size) // 发生回环 in kfifo_out()
96 uint32_t tmp = fifo->total_size - fifo->out_offset; in kfifo_out()
128 if (fifo->out_offset + size > fifo->total_size) // 发生回环 in kfifo_out_peek()
130 uint32_t tmp = fifo->total_size - fifo->out_offset; in kfifo_out_peek()
/DragonOS-0.1.7/kernel/src/common/
Dkfifo.h8 uint32_t total_size; // 缓冲区总空间 member
40 #define kfifo_total_size(fifo) ((fifo)->total_size)
63 #define kfifo_full(fifo) (((fifo)->size == (fifo)->total_size) ? 1 : 0)
/DragonOS-0.1.7/kernel/src/ktest/
Dtest-kfifo.c21 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
39 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
88 assert(fifo.size == fifo.total_size); in ktest_kfifo_case0_1()
99 assert(fifo.size == (fifo.total_size - 20 * sizeof(uint64_t))); in ktest_kfifo_case0_1()
139 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/
Dxhci.c545 int total_size = trbs * sizeof(struct xhci_TRB_t); in xhci_create_ring() local
546 const uint64_t vaddr = (uint64_t)kmalloc(total_size, 0); in xhci_create_ring()
548 memset((void *)vaddr, 0, total_size); in xhci_create_ring()
551 xhci_TRB_set_link_cmd(vaddr + total_size - sizeof(struct xhci_TRB_t)); in xhci_create_ring()