On Wed, 12 Mar 2025 07:47:50 +0100
Gabriele Monaco <gmon...@redhat.com> wrote:

>  -/*
> > - * Futher monitor types are expected, so make this a union.
> > - */
> >  union rv_task_monitor {
> > -   struct da_monitor da_mon;
> > +   struct da_monitor       da_mon;
> > +   struct ltl_monitor      ltl_mon;
> >  };  
> 
> This adds quite some memory overhead if we have multiple per-task
> monitors (we might in the future) and we don't use this ltl monitors.
> What about keeping it conditionally compiled out?
> You could define the struct only if e.g. CONFIG_RV_LTL_MONITORS is set,
> select it with any LTL monitor via Kconfig, then glue it somehow to
> have it readable.

One thing to do if you compile it out, make it a stub structure, so you
don't need to add #ifdef into the union.

struct ltl_monitor { int unused; };

Or something like that.

-- Steve

Reply via email to