Lines Matching refs:fifo

11     struct kfifo_t fifo;  in ktest_kfifo_case0_1()  local
13 assert(kfifo_alloc(&fifo, fifo_size, 0) == 0); in ktest_kfifo_case0_1()
17 kfifo_init(&fifo, buf, fifo_size); in ktest_kfifo_case0_1()
20 assert(fifo.buffer != NULL); in ktest_kfifo_case0_1()
21 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
22 assert(kfifo_total_size(&fifo) == fifo_size); in ktest_kfifo_case0_1()
23 assert(fifo.size == 0); in ktest_kfifo_case0_1()
24 assert(kfifo_size(&fifo) == 0); in ktest_kfifo_case0_1()
25 assert(fifo.in_offset == 0); in ktest_kfifo_case0_1()
26 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
27 assert(kfifo_empty(&fifo) == 1); in ktest_kfifo_case0_1()
28 assert(kfifo_full(&fifo) == 0); in ktest_kfifo_case0_1()
34 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
36 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
37 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
38 assert(fifo.size == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
39 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
45 assert(kfifo_out(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
47 assert(fifo.size == (10 - i) * sizeof(uint64_t)); in ktest_kfifo_case0_1()
48 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
49 assert(fifo.out_offset == i * sizeof(uint64_t)); in ktest_kfifo_case0_1()
52 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
53 assert(fifo.out_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
54 assert(fifo.in_offset == fifo.out_offset); in ktest_kfifo_case0_1()
55 assert(kfifo_empty(&fifo) == 1); in ktest_kfifo_case0_1()
58 kfifo_reset(&fifo); in ktest_kfifo_case0_1()
59 assert(fifo.in_offset == 0); in ktest_kfifo_case0_1()
60 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
61 assert(fifo.size == 0); in ktest_kfifo_case0_1()
67 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
70 assert(fifo.size == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
71 assert(fifo.in_offset == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
72 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
77 assert(kfifo_in(&fifo, &tmp, sizeof(__int128_t)) == 0); in ktest_kfifo_case0_1()
78 assert(fifo.size == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
79 assert(fifo.in_offset == 31 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
80 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
85 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
86 assert(kfifo_full(&fifo)); in ktest_kfifo_case0_1()
87 assert(kfifo_empty(&fifo) == 0); in ktest_kfifo_case0_1()
88 assert(fifo.size == fifo.total_size); in ktest_kfifo_case0_1()
89 assert(fifo.in_offset == fifo_size); in ktest_kfifo_case0_1()
90 assert(fifo.out_offset == 0); in ktest_kfifo_case0_1()
97 assert(kfifo_out(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
99 assert(fifo.size == (fifo.total_size - 20 * sizeof(uint64_t))); in ktest_kfifo_case0_1()
100 assert(fifo.in_offset == fifo_size); in ktest_kfifo_case0_1()
101 assert(fifo.out_offset == 20 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
107 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
108 assert(fifo.in_offset == 1 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
112 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1()
114 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
115 assert(fifo.size == 22 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
121 assert(kfifo_out(&fifo, &tmp, 20 * sizeof(uint64_t)) == 20 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
122 assert(fifo.out_offset == 8 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
123 assert(fifo.size == 2 * (sizeof(uint64_t))); in ktest_kfifo_case0_1()
129 assert(kfifo_in(&fifo, &tmp, 25 * sizeof(uint64_t)) == 25 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
130 assert(fifo.out_offset == 8 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
131 assert(fifo.size == 27 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
132 assert(fifo.in_offset == 3 * sizeof(uint64_t)); in ktest_kfifo_case0_1()
136 uint32_t prev_in_offset = fifo.in_offset; in ktest_kfifo_case0_1()
137 kfifo_reset_out(&fifo); in ktest_kfifo_case0_1()
138 assert(fifo.size == 0); in ktest_kfifo_case0_1()
139 assert(fifo.total_size == fifo_size); in ktest_kfifo_case0_1()
140 assert(fifo.in_offset == prev_in_offset); in ktest_kfifo_case0_1()
141 assert(fifo.out_offset == prev_in_offset); in ktest_kfifo_case0_1()
146 kfifo_free_alloc(&fifo); in ktest_kfifo_case0_1()
147 assert(fifo.buffer == NULL); in ktest_kfifo_case0_1()