From e8faf2f2adeb9066de3c968a57803bb262f61ee1 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 18 Jan 2022 18:57:06 +0000 Subject: 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 --- apps/tagcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/tagcache.c') 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) #else /* !__PCTOOL__ */ /* Need to pass dummy ops to prevent the buffer being moved * out from under us, since we yield during the tagcache commit. */ - static struct buflib_callbacks dummy_ops; - tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &dummy_ops); + tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &buflib_ops_locked); if (tempbuf_handle > 0) { tempbuf = core_get_data(tempbuf_handle); -- cgit v1.2.3