Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make handler functions available in <SharedCode> #4

Open
gtarawneh opened this issue Apr 26, 2018 · 1 comment
Open

Make handler functions available in <SharedCode> #4

gtarawneh opened this issue Apr 26, 2018 · 1 comment

Comments

@gtarawneh
Copy link
Member

Is it possible to add support for using handler_log and handler_exit in <SharedCode>?

@gtarawneh gtarawneh changed the title Make handler function available in <SharedCode> Make handler functions available in <SharedCode> Apr 26, 2018
@m8pple
Copy link
Collaborator

m8pple commented Apr 27, 2018

Shane would need to comment about the 0.3 softswitch, but for the older 0.2 softswitch I think
that it would probably already work. It uses a global context to track which device is active,
so there is not a problem there.

Supporting it in epoch_sim is a little more complex, though certainly not impossible.
At the moment the handler_log function is a lambda for convenience reasons, as it
stays within the scope of the handler. It could be forwarded out into global scope
using std::function or something, though it would need to be a thread-local-variable...

So yes, I think that can be supported with a small performance penalty in software,
and no performance penalty in HW. I'll talk to Shane about it to make sure it's still
possible though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants