Lines Matching refs:wlen
150 static ALWAYS_INLINE void tmp_wr_idx_inc(struct mpsc_pbuf_buffer *buffer, int32_t wlen) in tmp_wr_idx_inc() argument
152 buffer->tmp_wr_idx = idx_inc(buffer, buffer->tmp_wr_idx, wlen); in tmp_wr_idx_inc()
158 static void rd_idx_inc(struct mpsc_pbuf_buffer *buffer, int32_t wlen) in rd_idx_inc() argument
160 buffer->rd_idx = idx_inc(buffer, buffer->rd_idx, wlen); in rd_idx_inc()
164 static void add_skip_item(struct mpsc_pbuf_buffer *buffer, uint32_t wlen) in add_skip_item() argument
167 .skip = { .valid = 0, .busy = 1, .len = wlen } in add_skip_item()
171 tmp_wr_idx_inc(buffer, wlen); in add_skip_item()
172 buffer->wr_idx = idx_inc(buffer, buffer->wr_idx, wlen); in add_skip_item()
337 size_t wlen, k_timeout_t timeout) in mpsc_pbuf_alloc() argument
346 MPSC_PBUF_DBG(buffer, "alloc %d words", (int)wlen); in mpsc_pbuf_alloc()
348 if (wlen > (buffer->size)) { in mpsc_pbuf_alloc()
365 if (free_wlen >= wlen) { in mpsc_pbuf_alloc()
370 tmp_wr_idx_inc(buffer, wlen); in mpsc_pbuf_alloc()
404 memset(item, 0, sizeof(int) * wlen); in mpsc_pbuf_alloc()
413 uint32_t wlen = buffer->get_wlen(item); in mpsc_pbuf_commit() local
418 buffer->wr_idx = idx_inc(buffer, buffer->wr_idx, wlen); in mpsc_pbuf_commit()
481 size_t wlen) in mpsc_pbuf_put_data() argument
502 if (free_wlen >= wlen) { in mpsc_pbuf_put_data()
504 wlen * sizeof(uint32_t)); in mpsc_pbuf_put_data()
505 buffer->wr_idx = idx_inc(buffer, buffer->wr_idx, wlen); in mpsc_pbuf_put_data()
506 tmp_wr_idx_inc(buffer, wlen); in mpsc_pbuf_put_data()
580 uint32_t wlen = buffer->get_wlen(item); in mpsc_pbuf_free() local
596 buffer->tmp_rd_idx = idx_inc(buffer, buffer->tmp_rd_idx, wlen); in mpsc_pbuf_free()
598 rd_idx_inc(buffer, wlen); in mpsc_pbuf_free()
601 witem->skip.len = wlen; in mpsc_pbuf_free()