Home
last modified time | relevance | path

Searched refs:in_offset (Results 1 – 3 of 3) sorted by relevance

/DragonOS-0.1.3/kernel/src/ktest/
Dtest-kfifo.c25 assert(fifo.in_offset == 0); in ktest_kfifo_case0_1()
36 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
48 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
52 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
54 assert(fifo.in_offset == fifo.out_offset); in ktest_kfifo_case0_1()
59 assert(fifo.in_offset == 0); in ktest_kfifo_case0_1()
71 assert(fifo.in_offset == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
79 assert(fifo.in_offset == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
89 assert(fifo.in_offset == fifo_size); in ktest_kfifo_case0_1()
100 assert(fifo.in_offset == fifo_size); in ktest_kfifo_case0_1()
[all …]
/DragonOS-0.1.3/kernel/src/libs/
Dkfifo.c60 if (fifo->in_offset + size > fifo->total_size) // 发生回环 in kfifo_in()
62 uint32_t tmp = fifo->total_size - fifo->in_offset; in kfifo_in()
63 memcpy(fifo->buffer + fifo->in_offset, from, tmp); in kfifo_in()
65 fifo->in_offset = size - tmp; in kfifo_in()
69 memcpy(fifo->buffer + fifo->in_offset, from, size); in kfifo_in()
70 fifo->in_offset += size; in kfifo_in()
/DragonOS-0.1.3/kernel/src/common/
Dkfifo.h10 uint32_t in_offset; // 入口偏移 member
21 (fifo)->in_offset = 0; \
31 (fifo)->out_offset = (fifo)->in_offset; \