Lines Matching full:fifo

8  * @file measure time for various FIFO operations
11 * FIFO operations from both kernel threads and user threads:
12 * 1. Immediately adding a data item to a FIFO
13 * 2. Immediately removing a data item from a FIFO
14 * 3. Immediately adding a data item to a FIFO with allocation
15 * 4. Immediately removing a data item from a FIFO with allocation
16 * 5. Blocking on removing a data item from a FIFO
17 * 6. Waking (and context switching to) a thread blocked on a FIFO via
19 * 7. Waking (and context switching to) a thread blocked on a FIFO via
30 static K_FIFO_DEFINE(fifo);
49 k_fifo_put(&fifo, fifo_data); in fifo_put_get_thread_entry()
53 data = k_fifo_get(&fifo, K_NO_WAIT); in fifo_put_get_thread_entry()
74 k_fifo_alloc_put(&fifo, fifo_data); in fifo_put_get_thread_entry()
78 data = k_fifo_get(&fifo, K_NO_WAIT); in fifo_put_get_thread_entry()
110 k_thread_access_grant(&start_thread, &pause_sem, &fifo); in fifo_ops()
116 "fifo.put.immediate.%s", in fifo_ops()
119 "%-40s - Add data to FIFO (no ctx switch)", tag); in fifo_ops()
128 "fifo.get.immediate.%s", in fifo_ops()
131 "%-40s - Get data from FIFO (no ctx switch)", tag); in fifo_ops()
140 "fifo.put.alloc.immediate.%s", in fifo_ops()
143 "%-40s - Allocate to add data to FIFO (no ctx switch)", tag); in fifo_ops()
151 "fifo.get.free.immediate.%s", in fifo_ops()
154 "%-40s - Free when getting data from FIFO (no ctx switch)", tag); in fifo_ops()
183 /* 1. Block waiting for data on FIFO */ in alt_thread_entry()
187 data = k_fifo_get(&fifo, K_FOREVER); in alt_thread_entry()
204 /* 4. Block waiting for data on FIFO */ in alt_thread_entry()
208 data = k_fifo_get(&fifo, K_FOREVER); in alt_thread_entry()
247 k_fifo_put(&fifo, fifo_data); in start_thread_entry()
258 k_fifo_alloc_put(&fifo, fifo_data); in start_thread_entry()
291 k_thread_access_grant(&start_thread, &alt_thread, &pause_sem, &fifo); in fifo_blocking_ops()
292 k_thread_access_grant(&alt_thread, &pause_sem, &fifo); in fifo_blocking_ops()
298 "fifo.get.blocking.%s_to_%s", in fifo_blocking_ops()
302 "%-40s - Get data from FIFO (w/ ctx switch)", tag); in fifo_blocking_ops()
310 "fifo.put.wake+ctx.%s_to_%s", in fifo_blocking_ops()
314 "%-40s - Add data to FIFO (w/ ctx switch)", tag); in fifo_blocking_ops()
322 "fifo.get.free.blocking.%s_to_%s", in fifo_blocking_ops()
326 "%-40s - Free when getting data from FIFO (w/ ctx siwtch)", tag); in fifo_blocking_ops()
334 "fifo.put.alloc.wake+ctx.%s_to_%s", in fifo_blocking_ops()
338 "%-40s - Allocate to add data to FIFO (w/ ctx switch)", tag); in fifo_blocking_ops()