diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-03-30 15:41:30 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-03-30 15:41:30 -0700 |
commit | ad31d39a7edad0fc4c59a4fb254cbb214a4ed1b1 (patch) | |
tree | ad65d9cb420ef9fa69bc82e4993dfed96dee4934 /src/modules/rtv/rtv.c | |
parent | e8e79b7a2b88262b84bf6006bc7cd5764962fdc9 (diff) |
*: use til_module_create_context() in more places
Just mechanical replacement of some remaining ad-hoc
til_module_t.create_context() calls.
The montage module continues using an ad-hoc call because it
forces num_cpus=1 since it's already a threaded using a fragment
per module's tile. This suggests the til_module_create_context()
call should probably accept a num_cpus parameter, perhaps
treating a 0 value as the "automagic" discover value so callers
can explicitly set it when necessary.
Diffstat (limited to 'src/modules/rtv/rtv.c')
-rw-r--r-- | src/modules/rtv/rtv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index 6464a8e..1804613 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -198,8 +198,8 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks) ctxt->next_hide_caption = now + rtv_caption_duration; } - if (!ctxt->channel->module_ctxt && ctxt->channel->module->create_context) - ctxt->channel->module_ctxt = ctxt->channel->module->create_context(ticks, ctxt->n_cpus); + if (!ctxt->channel->module_ctxt) + (void) til_module_create_context(ctxt->channel->module, ticks, &ctxt->channel->module_ctxt); ctxt->channel->last_on_time = now; } @@ -241,8 +241,7 @@ static void * rtv_create_context(unsigned ticks, unsigned num_cpus) ctxt->snow_channel.module = &none_module; if (rtv_snow_module) { ctxt->snow_channel.module = til_lookup_module(rtv_snow_module); - if (ctxt->snow_channel.module->create_context) - ctxt->snow_channel.module_ctxt = ctxt->snow_channel.module->create_context(ticks, ctxt->n_cpus); + (void) til_module_create_context(ctxt->snow_channel.module, ticks, &ctxt->snow_channel.module_ctxt); } for (size_t i = 0; i < n_modules; i++) { |