spsc_pbuf: Fix cache wb in spsc_pbuf_free

This commit properly writes back cached read pointer in spsc buffer
when freeing the memory.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
Radoslaw Koppel 2022-12-05 12:04:52 +01:00 committed by Fabio Baltieri
parent 47c8db5e63
commit 5a55d53242
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ void spsc_pbuf_free(struct spsc_pbuf *pb, uint16_t len)
*rd_idx_loc = rd_idx;
__sync_synchronize();
cache_wb(&rd_idx_loc, sizeof(*rd_idx_loc), flags);
cache_wb(rd_idx_loc, sizeof(*rd_idx_loc), flags);
}
int spsc_pbuf_read(struct spsc_pbuf *pb, char *buf, uint16_t len)