From ade362b53d721bc2e2c7a62a30c4345014e5f5ce Mon Sep 17 00:00:00 2001
From: Vito Caputo <vcaputo@pengaru.com>
Date: Sat, 23 Nov 2019 16:08:07 -0800
Subject: rototiller: pass num_cpus to .create_context()

Back in the day, there was no {create,destroy}_context(), so passing
num_cpus to just prepare_frame made sense.  Modules then would
implicitly initialize themselves on the first prepare_frame() call
using a static initialized variable.

Since then things have been decomposed a bit for more sophisticated
(and cleaner) modules.  It can be necessary to allocate per-cpu data
structures and the natural place to do that is @ create_context().  So
this commit wires that up.

A later commit will probably have to plumb a "current cpu" identifier
into the render_fragment() function.  Because a per-cpu data structure
isn't particularly useful if you can't easily address it from within
your execution context.
---
 src/modules/swab/swab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/modules/swab')

diff --git a/src/modules/swab/swab.c b/src/modules/swab/swab.c
index 6528900..aa53566 100644
--- a/src/modules/swab/swab.c
+++ b/src/modules/swab/swab.c
@@ -60,7 +60,7 @@ static inline uint32_t color_to_uint32(color_t color) {
 }
 
 
-static void * swab_create_context(void)
+static void * swab_create_context(unsigned num_cpus)
 {
 	swab_context_t	*ctxt;
 
-- 
cgit v1.2.3