/Zephyr-latest/subsys/ipc/ipc_service/lib/ |
D | pbuf.c | 19 static uint32_t idx_occupied(uint32_t len, uint32_t wr_idx, uint32_t rd_idx) in idx_occupied() argument 22 return (rd_idx > wr_idx) ? (len - (rd_idx - wr_idx)) : (wr_idx - rd_idx); in idx_occupied() 81 pb->data.rd_idx = 0; in pbuf_tx_init() 85 *(pb->cfg->rd_idx_loc) = pb->data.rd_idx; in pbuf_tx_init() 107 pb->data.rd_idx = 0; in pbuf_rx_init() 125 uint32_t rd_idx = *(pb->cfg->rd_idx_loc); in pbuf_write() local 133 if (!IS_PTR_ALIGNED_BYTES(rd_idx, _PBUF_IDX_SIZE)) { in pbuf_write() 137 uint32_t free_space = blen - idx_occupied(blen, wr_idx, rd_idx) - _PBUF_IDX_SIZE; in pbuf_write() 193 uint32_t rd_idx = pb->data.rd_idx; in pbuf_read() local 196 __ASSERT_NO_MSG(IS_PTR_ALIGNED_BYTES(rd_idx, _PBUF_IDX_SIZE)); in pbuf_read() [all …]
|
/Zephyr-latest/lib/os/ |
D | spsc_pbuf.c | 64 return &pb->common.rd_idx; in get_rd_idx_loc() 125 pb->common.rd_idx = 0; in spsc_pbuf_init() 156 uint32_t rd_idx = *rd_idx_loc; in spsc_pbuf_alloc() local 159 if (wr_idx >= rd_idx) { in spsc_pbuf_alloc() 171 if ((remaining >= space) || (rd_idx <= space)) { in spsc_pbuf_alloc() 177 free_space = remaining - ((rd_idx > 0) ? 0 : FREE_SPACE_DISTANCE); in spsc_pbuf_alloc() 188 free_space = rd_idx - FREE_SPACE_DISTANCE; in spsc_pbuf_alloc() 192 free_space = rd_idx - wr_idx - FREE_SPACE_DISTANCE; in spsc_pbuf_alloc() 262 uint32_t rd_idx = *rd_idx_loc; in spsc_pbuf_claim() local 264 if (rd_idx == wr_idx) { in spsc_pbuf_claim() [all …]
|
D | mpsc_pbuf.c | 24 buffer->rd_idx, buffer->tmp_rd_idx); in mpsc_state_print() 68 if (buffer->rd_idx > buffer->tmp_wr_idx) { in free_space() 69 *res = buffer->rd_idx - buffer->tmp_wr_idx; in free_space() 103 f += (buffer->rd_idx - 1); in get_usage() 153 if (buffer->tmp_wr_idx == buffer->rd_idx) { in tmp_wr_idx_inc() 160 buffer->rd_idx = idx_inc(buffer, buffer->rd_idx, wlen); in rd_idx_inc() 183 item = (union mpsc_pbuf_generic *)&buffer->buf[buffer->rd_idx]; in drop_item_locked() 193 buffer->tmp_rd_idx = buffer->rd_idx; in drop_item_locked() 220 if (buffer->rd_idx == buffer->tmp_rd_idx) { in drop_item_locked() 225 buffer->rd_idx = buffer->tmp_rd_idx; in drop_item_locked() [all …]
|
/Zephyr-latest/drivers/serial/ |
D | uart_async_rx.c | 64 rx_data->rd_idx = 0; in usr_rx_buf_release() 95 if ((buf->completed == 1) && (rx_data->rd_idx == buf->wr_idx)) { in uart_async_rx_data_claim() 102 *data = &buf->buffer[rx_data->rd_idx]; in uart_async_rx_data_claim() 103 rem = buf->wr_idx - rx_data->rd_idx; in uart_async_rx_data_claim() 112 rx_data->rd_idx += length; in uart_async_rx_data_consume() 114 if ((buf->completed == 1) && (rx_data->rd_idx == buf->wr_idx)) { in uart_async_rx_data_consume() 120 __ASSERT_NO_MSG(rx_data->rd_idx <= buf->wr_idx); in uart_async_rx_data_consume() 128 rx_data->rd_idx = 0; in uart_async_rx_reset()
|
/Zephyr-latest/modules/hal_nordic/nrf_802154/serialization/platform/ |
D | nrf_802154_spinel_backend_ipc.c | 111 static uint8_t rd_idx; variable 121 if (get_rb_idx_plus_1(wr_idx) == rd_idx) { in spinel_packet_from_thread_send() 143 struct ringbuffer *buf = &ring_buffer[rd_idx]; in spinel_packet_send_thread_fn() 149 rd_idx = get_rb_idx_plus_1(rd_idx); in spinel_packet_send_thread_fn()
|
/Zephyr-latest/include/zephyr/drivers/serial/ |
D | uart_async_rx.h | 58 uint8_t rd_idx; member
|
/Zephyr-latest/subsys/logging/frontends/ |
D | log_frontend_stmesp_demux.c | 114 int32_t rd_idx = source_ids_data[0]; in get_source_id() local 120 rd_idx = (rd_idx == 0) ? (demux.source_id_len - 1) : (rd_idx - 1); in get_source_id() 121 if (source_ids[rd_idx].entry_id == entry_id) { in get_source_id() 122 return source_ids[rd_idx].source_id; in get_source_id()
|
/Zephyr-latest/include/zephyr/sys/ |
D | spsc_pbuf.h | 69 uint32_t rd_idx; /* Index of the first valid byte in data[] */ member
|
D | mpsc_pbuf.h | 101 uint32_t rd_idx; member
|
/Zephyr-latest/include/zephyr/ipc/ |
D | pbuf.h | 77 volatile uint32_t rd_idx; /* Index of the first holding first member
|
/Zephyr-latest/doc/services/ipc/ipc_service/backends/ |
D | ipc_service_icmsg.rst | 126 * - ``rd_idx`` 145 * The Indexes (``rd_idx`` and ``wr_idx``) are wrapped around when they reach the end of the ``data`… 146 * The FIFO is empty if ``rd_idx == wr_idx``. 195 #. Set the ``wr_idx`` and ``rd_idx`` to zero.
|
/Zephyr-latest/drivers/interrupt_controller/ |
D | intc_gicv3_its.c | 300 uint64_t wr_idx, rd_idx, idx; in its_post_command() local 304 rd_idx = sys_read32(data->base + GITS_CREADR); in its_post_command() 320 rd_idx, idx, wr_idx); in its_post_command()
|
/Zephyr-latest/tests/subsys/ipc/pbuf/src/ |
D | main.c | 29 printk("data.rd_idx: %u\n", pb->data.rd_idx); in print_pbuf_info()
|
/Zephyr-latest/doc/services/logging/ |
D | cs_stm.rst | 209 [00:00:00.214,750] <inf> rad/spsc_pbuf: claim 0x2f0df800 rd_idx:20 210 [00:00:00.235,823] <inf> rad/spsc_pbuf: free 0x2f0df800 len:20 rd_idx: 44
|