Hi Ciro. You are correct that there isn't a header for those symbols,
although the signature for m5_exit and m5_exit_addr should be identical.
The mechanism supporting those symbols should all be in place and there are
unit tests for them, although those tests are at least partially still
under review. I hadn't figured out what would be the best way to add those
symbols without a lot of duplication, but if you want to define an
m5_exit_addr with the same signature as the original that should just work,
assuming you've set it up to use the right address through other means. I'm
still not sure exactly what the best approach is in general, so we should
probably hold off on any large scale change for now.

Gabe

On Tue, Oct 27, 2020 at 6:54 AM Ciro Santilli via gem5-users <
gem5-users@gem5.org> wrote:

> Hi,
>
> I have m5_exit working on a C program at
> https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/simple/m5_exit.c#41
>  but
> now I wanted to create one using the memory address version.
>
> We already have a m5_exit_addr symbol defined in the library, but I
> couldn't find it exposed in any headers.
>
> Do I just submit a patch adding all the symbols to include/gem5/m5ops.h,
> e.g. void m5_exit_addr(uint64_t ns_delay); ? Or is there already a way to
> access those that you know of?
>
> If a patch is needed, any clues what would be the best approach? I see
> that currently the magic happens under:
>
> struct DispatchTable
> {
> #define M5OP(name, func) __typeof__(&::name) name;
> M5OP_FOREACH
> #undef M5OP
>
> and:
>
> DispatchTable addr_dispatch = {
> #define M5OP(name, func) .name = &::M5OP_MERGE_TOKENS(name, _addr),
> M5OP_FOREACH
> #undef M5OP
>
> so I'm guessing I could add a similar M5OP_FOREACH + __typeof__ hack to 
> include/gem5/m5ops.h
> to avoid repeating each function?
>
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to