Commit graph

3 commits

Author SHA1 Message Date
Aidan MacDonald
800bc000a0 buflib: Add pinned get/put data functions
These are more efficient than separate pin/unpin calls because
pin count increment and decrement can be done cheaply when the
data pointer is known.

Secondly, pinned access can be made safe against preemption by
hardware interrupts or other CPU cores; buflib_get_data() can't.
This makes it more useful under different threading models and
for SMP targets; both of which are not particularly relevant to
Rockbox now, but might be in the future.

Change-Id: I09284251b83bbbc59ef88a494c8fda26a7f7ef26
2023-01-15 11:06:27 +00:00
Aidan MacDonald
f995c26de9 buflib: Add CONFIG_BUFLIB_BACKEND for selecting a buflib backend
Defaults to the normal "mempool" backend, which is currently the
only implementation.

Change-Id: I56d034a6e0f5edc90c39526d1551945eec6ca336
2023-01-15 10:04:13 +00:00
Aidan MacDonald
680261fbb7 buflib: Prep for multiple backend support, rename to buflib_mempool
Rename the current buflib implementation to buflib_mempool.

Change-Id: Iefdf74be1f7d8fcd19e6ce2289c3d1459b54d013
2023-01-15 10:04:13 +00:00
Renamed from firmware/buflib.c (Browse further)