diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-01-18 18:57:06 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-02-12 10:24:32 -0500 |
commit | e8faf2f2adeb9066de3c968a57803bb262f61ee1 (patch) | |
tree | 130c2e3d904da7876ac88ea089f85f48cab5e313 /apps/tagcache.c | |
parent | 95dfc489b5a602f68202b206c434f8485e9d3915 (diff) | |
download | rockbox-e8faf2f2adeb9066de3c968a57803bb262f61ee1.tar.gz rockbox-e8faf2f2adeb9066de3c968a57803bb262f61ee1.zip |
buflib: add a common dummy callbacks struct & use it
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 37f443e036..fc06005c1d 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -328,8 +328,7 @@ static void allocate_tempbuf(void) | |||
328 | #else /* !__PCTOOL__ */ | 328 | #else /* !__PCTOOL__ */ |
329 | /* Need to pass dummy ops to prevent the buffer being moved | 329 | /* Need to pass dummy ops to prevent the buffer being moved |
330 | * out from under us, since we yield during the tagcache commit. */ | 330 | * out from under us, since we yield during the tagcache commit. */ |
331 | static struct buflib_callbacks dummy_ops; | 331 | tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &buflib_ops_locked); |
332 | tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &dummy_ops); | ||
333 | if (tempbuf_handle > 0) | 332 | if (tempbuf_handle > 0) |
334 | { | 333 | { |
335 | tempbuf = core_get_data(tempbuf_handle); | 334 | tempbuf = core_get_data(tempbuf_handle); |